When you have a problem with your web server it is often quite useful to use a system call tracer to see what the web server is doing.
The strace command would be :-
strace -fe verbose=all -e write=all -o /tmp/strace.log -p [pid]
-f traces all child processes as they are created byt he currently traced process as a result of the fork() system call.
-e is a qualifying expression which modifies which events to trace or how to race them
verbose=all dereferences structures for all system calls
write=all performs a full hexadecimal and ASCII dump of all the data written to all file descriptors
-o output file
-p process id to trace
Replace -p [pid] with [command] to trace a specific command.