Strange behaviour when web server becomes unresponsive (not web server related)

Hardware and software installed:
FreeBSD 7.2-RELEASE p4
Xenon Quad CPU, 8gb ram
Network: 2 x Intel Pro/1000, one used for external network and one for internal.
This server runs lighttpd 1.5.23 with PHP (5.2.10) FastCGI, and thats what's it's job is. The server is handling around 250 accesses/second when most busy.

The issue:
Web page becomes unresponsive for individual connections. The browser stays in a state ”Connecting to ...” for about 20-30 seconds. Sometimes it ”comes out of it” by itself and loads the page, and sometimes it displays ”page not found”. It feels completely random, and this normally occurs after about 30 seconds.

I noticed that while page is unresponsive I can get the page to load instantly by pinging this machine. This is working every time and “releases” the unresponsive state immediately. Also visiting the site by IP-address instead of using the domain name works to bring it back to life.

While my, or any other connection, is not working, the server still handles other traffic. I also want to say that once the page is unresponsive with a browser, I can not reach the site on a new browser either (by the domain name).

What I know so far:
This is most likely not related to either lighttpd nor PHP. The issue is there with Lighttpd, Apache, PHP-pages or simple html-pages (like /server-status).

Possibly DNS-related (?). I have two DNS servers in /etc/resolv.conf, and use “domain <domainame>.com” at the top of the file. DNS-servers are fast and works fine.

Besides default configuration, I have set these sysctl-values:

Code:
vm.pmap.shpgperproc=1000

kern.ipc.somaxconn=16384

net.inet.tcp.rfc1323=1
kern.ipc.maxsockbuf=16777216

kern.ipc.shmmax=134217728
kern.ipc.shmall=32768
kern.ipc.semmap=256

kern.maxvnodes=300000
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_inc=16384
net.inet.tcp.recvbuf_inc=524288
net.inet.tcp.sendspace=65536


Ideas are highly appreciated. I have struggled with this for weeks, and I'm out of ideas :(

Thanks.
 
lighttpd version is 1.4.23, I typed wrong in my first post. Did not find an edit option for the post.
 
Back
Top