Arquivos
hhvm/hphp/doc/debug.server
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

28 linhas
1.0 KiB
Plaintext

<h2>How to Debug Server Problems</h2>
1. Crashing and other memory problems
Normally a crash generates /tmp/stacktrace.<pid>.log file that has stacktrace
where crash happens. Sometimes, a crash can happen badly without giving crash
log a chance to generate a readable stack. Then use ResourceLimit.CoreFileSize
to turn on coredumps to capture a crash.
Another way is to use Debug.RecordInput option to capture bad HTTP requests.
Debug.RecordInput = true
Debug.ClearInputOnSuccess = false
Then replay with "-m replay" option from the compiled program at command line.
This way, one can run it under valgrind to detect memory problems.
./program -m replay -c config.hdf --count=3 /tmp/hphp_request_captured
./program -m replay -c config.hdf captured_request1 captured_request2
./program -m replay -c config.hdf --count=2 req1 req2
2. Server hanging and other status problems
Admin server commands provide status information that may be useful for
debugging, esp. /status.json command that will tell network I/O status of each
thread.