Apache runs, but doesn't accept anything

jep

Verified User
Joined
Nov 12, 2003
Messages
79
Hi,

I have a strange problem almost every day. I don't know how to fix it.

Clients call me that their websites doesn't work. When I have a look, the connections are accepted but doesn't send any data. Then I get a timeout after a few seconds.

The only solution is restarting apache, but it shouldn't be needed. When I 'm not behind my pc, I'm not always able to restart it.

I've tried the following things:

ulimit -SHn 65000

(In bashrc)

Set maxclients in httpd.conf to 256

And maxrequestsperchild on 1000.

When this happens, there's almost no load on the server and after the restart, everything works smooth again.

The server is not heavy loaded at all.


Does anybody have clue? I don't have this on other (busy!) servers.


Thanks
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,051
How many websites are running on the server? When you get up into the 750-800+ range, some kernels just can't handle the number of filedescriptors that apache holds open for the ErrorLogs. Try commenting out the ErrorLog directives for the virtual_host_sub.conf, virtual_host_secure.conf and virtual_host_secure_sub.conf file, then running:

echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

Should free up quite a large number of filedescriptors.. give that a go and see if it was the problem.

John
 

jep

Verified User
Joined
Nov 12, 2003
Messages
79
There are only 40 domains and 20 users on the machine. It's not an open files issue.

I have servers with 200+ domains, without any problem. That's just weird. :)
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,051
Is there anything showing up in the apache logs?
/var/log/httpd/* and /var/log/messages

John
 
Top