You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users commonly experience problems with their servers hanging, usually because of bad plugin code.
The best way to identify the cause of this problem is using gdb on Linux platforms. However, the process to do this is currently quite cumbersome:
$ sudo gdb bin/php7/bin/php $(cat server.lock) - this attaches to the server process
(gdb) source path/to/php/.gdbinit - load PHP's .gdbinit (which is usually not immediately to hand unless the binary was built with -d or -n, even though it's usable without either of these flags).
(gdb) zbacktrace - generates a PHP backtrace for the main thread.
(gdb) bt - generates a native backtrace for the main thread (usually not needed)
as well as a bunch of other finer details.
These steps can be repeated at intervals to see if there's a common theme on where the server is stuck.
It would be beneficial to users if this process could be reduced to a simple bash script like dump-server-stacks.sh, which, when run, would dump the stack traces of all currently active threads into the console without the confusing bullshit in the mix.
The text was updated successfully, but these errors were encountered:
Users commonly experience problems with their servers hanging, usually because of bad plugin code.
The best way to identify the cause of this problem is using gdb on Linux platforms. However, the process to do this is currently quite cumbersome:
$ sudo gdb bin/php7/bin/php $(cat server.lock)
- this attaches to the server process(gdb) source path/to/php/.gdbinit
- load PHP's.gdbinit
(which is usually not immediately to hand unless the binary was built with-d
or-n
, even though it's usable without either of these flags).(gdb) zbacktrace
- generates a PHP backtrace for the main thread.(gdb) bt
- generates a native backtrace for the main thread (usually not needed)as well as a bunch of other finer details.
These steps can be repeated at intervals to see if there's a common theme on where the server is stuck.
It would be beneficial to users if this process could be reduced to a simple bash script like
dump-server-stacks.sh
, which, when run, would dump the stack traces of all currently active threads into the console without the confusing bullshit in the mix.The text was updated successfully, but these errors were encountered: