Project

General

Profile

Debian No input file specified and Too many file open :'(

Added by petitchevalroux almost 15 years ago

Hi,

Under heavy load I get the famous problem "No input file specified" ... by the way I did research on how why .... and finally I ran strace on the fastcgi children. Here I get an other error message "Too many file open", so I set the server.max-fds to 4096 in my conf file ... same behavior.

I checked the default value (without setting the server.max-fds) using the following php script :

<?php
echo echo exec('ulimit -n');
?>

Which gave me :
1024

I put the server.max-fds to 1024 and looked to /proc/sys/fs/file-nr value, increase to 10880 file open, I shutt down lighttpd the value decrease to 640 which is not a random number 10880 - 10 * 1024 = 640. The 10 number seems to come from my PHP_FCGI_CHILDREN settings, Tell me if i am wrong ? So i decided to drop PHP_FCGI_CHILDREN to 1 in order to get only 1024 files open but the result stayed the same :'(.

I do not know if this problem is solved in lighttpd-1.4.22 as I used this f****ing old package from debian (If you too please ask to the debian maintainer to release http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520124 or http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516897). I am really confuse on how to deal this stuff should I compile 1.4.22 or tune some specific file open limit in the system ?

Kernel : 2.6.27.10
Lighttpd : 1.4.19

Thanks for all your work ;)


Replies (2)

RE: Debian No input file specified and Too many file open :'( - Added by petitchevalroux almost 15 years ago

I succeed to get some additionnal informations using lsof :

php5-cgi  10393    www-data 1020r      REG        8,2       580     822598 /home/data/www/htdocs/index.php
php5-cgi  10393    www-data 1021r      REG        8,2       580     822598 /home/data/www/htdocs/index.php
php5-cgi  10393    www-data 1022r      REG        8,2       580     822598 /home/data/www/htdocs/index.php

If I count how many index.php files are open :
lsof -f | grep "index.php" | wc -l
10200

It's look like fast-cgi doesn't close my php files, any idea on how to fix this stuff please ?

RE: Debian No input file specified and Too many file open :'( - Added by Olaf-van-der-Spek almost 15 years ago

server.max-fds is probably only for Lighttpd itself, not for PHP.
If PHP_FCGI_MAX_REQUESTS is set, that should take care of resource leaks by PHP.

    (1-2/2)