Hello! I have a web server running nginx + php-fpm FreeBSD 7.1-RELEASE. When traffic increases, the load doesn't go up noticeably, but I start getting massive timeouts because the php-cgi processes stop responding. In "top," I see a whole bunch of these php-cgi processes in "lockf" state, so I assume they're blocking while trying to acquire a lock on some file.
I tried using truss to see where this is occurring and get a lot of the following: # truss -p 77214 ... poll({10/POLLIN|POLLERR|POLLHUP},1,1000) = 1 (0x1) recvfrom(10,"STORED\r\n",8192,0x80,NULL,0x0) = 8 (0x8) close(10) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) fcntl(4,F_SETLKW,0x7fffffffc580) = 0 (0x0) ... That last line is repeated about 20 times, then the process seems to get the lock and go about its business, and then repeat. There always seems to be a pause in the truss output to my terminal after the "poll({10/POLLIN|POLLERR|POLLHUP},1,1000)" line as well. Is there a way to determine which file the process is trying to set a lock on? Or any other way to troubleshoot the cause of this problem? I tried running "lsof -p 77214," which showed a long list of files used by the process, but I didn't see anything about it trying to get a lock on a file. Googling suggests that "pfiles" on Solaris might help with this -- is there an analogous utility on FreeBSD? Thanks a lot in advance for any advice you might have! Antonio _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"