#22370 [Opn->Fbk]: CLOSE_WAIT sockets cause Apache to hit nofiles rlimit
| From: | wez@php.net | Date: | Sat, 22 Feb 2003 10:52:14 +0000 |
| Subject: | #22370 [Opn->Fbk]: CLOSE_WAIT sockets cause Apache to hit nofiles rlimit | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33904@lists.php.net to get a copy of this message | ||
ID: 22370
Updated by: wez@php.net
Reported By: a at webfiends dot com
-Status: Open
+Status: Feedback
Bug Type: Sockets related
Operating System: Solaris 8
PHP Version: 4.3.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
A fix for Bug #21713 went into CVS last night; it will
most likely fix this problem as well.
Please try a stable snapshot and report back to us.
Previous Comments:
------------------------------------------------------------------------
[2003-02-21 22:06:17] a at webfiends dot com
When including a remote URL...
[...]
<? include('http://www.php.net') ?>
[...]
The socket to the remote server is left in CLOSE_WAIT. Eventually the
Apache process runs out of file descriptors.
root@sweb-5134.atl7.sol.web.uu.net (29)# netstat -an | grep
64.246.30.37
63.111.105.8.44978 64.246.30.37.80 5840 0 24820 0
CLOSE_WAIT
63.111.105.8.44980 64.246.30.37.80 5840 0 24820 0
CLOSE_WAIT
[...]
root@sweb-5134.atl7.sol.web.uu.net (30)# pfiles 4706
4706: /usr/local/apache/1.3.27/bin/httpd -f
/etc/servers/apache/1.3.27/unixd
Current rlimit: 262 file descriptors
[...]
13: S_IFSOCK mode:0666 dev:229,0 ino:23031 uid:0 gid:0 size:0
O_RDWR
sockname: AF_INET 63.111.105.8 port: 44988
peername: AF_INET 64.246.30.37 port: 80
14: S_IFSOCK mode:0666 dev:229,0 ino:25628 uid:0 gid:0 size:0
O_RDWR
sockname: AF_INET 63.111.105.8 port: 45008
peername: AF_INET 64.246.30.37 port: 80
[...]
This problem doesn't occur with 4.2.3 on Solaris 8. When all of the
file desriptors have been used up, the child process can't include
files or lauch external processes e.g. sendmail.
[Thu Feb 20 12:02:48 2003] [error] [client 63.230.229.161] (24)Too many
open files: file permissions deny server access:
/export/home/xxxxxx/html/includes/common.inc
Here's our configure line...
[..]
env CC=gcc CFLAGS='-I/usr/local/openssl/0.9.7/include' \
./configure \
--prefix=/usr/local/php/4.3.1 \
--enable-safe-mode=yes \
--enable-memory-limit=yes \
--with-mysql=/usr/local/mysql/3.23.55 \
--with-gd \
--with-apxs=/usr/local/apache/1.3.27/bin/apxs \
--with-jpeg-dir=/usr/local \
--with-xpm-dir=/usr/local \
--with-png-dir=/usr/local \
--with-zlib-dir=/usr/local \
--with-openssl=/usr/local/openssl/0.9.7 \
--enable-wddx \
--enable-debug=no
[..]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22370&edit=1