Remove typechecker-only options from GlobalOptions to avoid code duplication
[hiphop-php.git] / hphp / doc / debug.server
bloba224d9ea076098d31b1a84842280f7208b011f47
2 <h2>How to Debug Server Problems</h2>
4 1. Crashing and other memory problems
6 Normally a crash generates /tmp/stacktrace.<pid>.log file that has stacktrace
7 where crash happens. Sometimes, a crash can happen badly without giving crash
8 log a chance to generate a readable stack. Then use ResourceLimit.CoreFileSize
9 to turn on coredumps to capture a crash.
11 Another way is to use Debug.RecordInput option to capture bad HTTP requests.
13   Debug.RecordInput = true
14   Debug.ClearInputOnSuccess = false
16 Then replay with "-m replay" option from the compiled program at command line.
17 This way, one can run it under valgrind to detect memory problems.
19   ./program -m replay -c config.hdf --count=3 /tmp/hphp_request_captured
20   ./program -m replay -c config.hdf captured_request1 captured_request2
21   ./program -m replay -c config.hdf --count=2 req1 req2
23 2. Server hanging and other status problems
25 Admin server commands provide status information that may be useful for
26 debugging, esp. /status.json command that will tell network I/O status of each
27 thread.