Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my ubuntu 10.04 VPS, I get a regular 500 error on nginx (0.7.??)+ fcgi web server running a durpal site and when I trace the nginx error log I see plenty of these:

socket() failed: No buffer space available) while connecting to upstream ...,

I have tried differnt combination of configs but none fixed the problem. Currently I have 3 nginx workers, Keep-alive time out 15 seconds and and

PHP_FCGI_CHILDREN=5 PHP_FCGI_MAX_REQUESTS=1000

I really appreciate if you Can you suggest a solution to this annoying problem.

share|improve this question

3 Answers 3

You are probably reaching your limit of RAM or of open sockets. Check the number of sockets with cat /proc/sys/fs/file-max and increase it with sysctl -w fs.file-max=[BIG NUMBER]

share|improve this answer

your problem is in the upstream server, not in nginx, but I'm just guessing.

You can set your worker processes to 4 and then try

share|improve this answer
    
Thanks, I tried your solution and will give the feedback. –  alfish Dec 13 '10 at 20:26
    
No chance Gaurav, I still get the same error –  alfish Dec 13 '10 at 20:34
    
You are exhausting a kernel resource. You should provide some basic information about what sort of system this is (is it a VPS? What OS?) etc –  Gaurav Singh Dec 13 '10 at 20:52
    
Sorry I added the OS info at the topic. It is ubuntu 10.04. The Linux Kernel is 2.6.18-194 –  alfish Dec 13 '10 at 21:09
1  
Comments are correct, answer is not. This is a local kernel problem. –  EJP Sep 8 '12 at 12:50

Add more RAM or free some system resources, to have allocable ram for system processes.

¿can you check free -mt or top, at the time that the error happens?

share|improve this answer

Your Answer

 
discard

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.