#Nginx debug# Use strace. First, you need to detect PID of nginx process:
# ps ax | grep nginx
25043 ? Ss 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
25044 ? S 0:02 nginx: worker process
Ok, so 25044 is the worker process. Now, we trace it:
# strace -p 25044 2>&1 | grep gz