Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dedicated server running about 120 hp scripts that connect to other servers to process commands. Sometimes I cannot gain access via SSH and FTP and I presume this is something to do with no connections being available.

Do I need to change something in apache to allow more connections or is it not as simple as that?

I am running CentOS with Apache. 16GB RAM.

share|improve this question
up vote 0 down vote accepted

Check your open files limit for the user the scripts/apache are running as. Sounds like you are running out of file descriptors.

share|improve this answer
Where do I find this option? – webnoob Jun 13 '11 at 14:30
Just found ulimit -aS and my open files is set to 1024. That not enough? – webnoob Jun 13 '11 at 14:34
ulimit applies to specific processes. cat /proc/sys/fs/file-max for the system-wide limit. Keep in mind that every file opened and every connection each take a file descriptor, so if someone connects to you, your server opens one script file, and connects to another server, that's a minimum of three descriptors per connection, and you probably use more than that (including other scripts, reading data files, etc). – DerfK Jun 13 '11 at 14:45
Is there any calculation I should do to limit this or should I be OK to set this to some really high number? I guess it will just use more RAM ? p.s Current value is: 1572114 - That normal? – webnoob Jun 13 '11 at 14:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.