#20274 [Com]: failed to create stream: Too many open files in Unknown on line
| From: | ewa at buffalo dot edu | Date: | Thu, 20 Mar 2003 16:39:11 +0000 |
| Subject: | #20274 [Com]: failed to create stream: Too many open files in Unknown on line | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36041@lists.php.net to get a copy of this message | ||
ID: 20274
Comment by: ewa at buffalo dot edu
Reported By: fowler at csufresno dot edu
Status: Feedback
Bug Type: iPlanet related
Operating System: Solaris (all)
PHP Version: 4CVS-2002-11-06
Assigned To: wez
New Comment:
having similar problem on:
php4.3.1, solaris 8, apache 1.3.17+ssl_1.48
webserver needs a restart ever 2-3 days otherwise
sites don't load properly and we get errors:
Warning: main() [function.main <http://www.php.net/function.main>]:
Failed
opening 'admissions_navigation.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/info/www/ubwww/admissions/index.php on line 13
Warning: main(admissions_page.inc) [function.main
<http://www.php.net/function.main>]:
failed to create stream: Too many open files in
/info/www/ubwww/admissions/index.php on line 14
Warning: main() [function.main <http://www.php.net/function.main>]:
Failed
opening 'classes/CONFIG/log_config.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/info/www/ubwww/admissions/index.php on line 15
Warning: main(classes/class_logger.inc) [function.main
<http://www.php.net/function.main>]: failed to
create stream: Too many
open
files in /info/www/ubwww/admissions/index.php on line 16
Warning: main() [function.main <http://www.php.net/function.main>]:
Failed
opening 'classes/class_logger.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/info/www/ubwww/admissions/index.php on line 16
Previous Comments:
------------------------------------------------------------------------
[2003-03-18 11:32:44] wez@php.net
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
Please try the next snapshot, available in approx 45 minutes time.
------------------------------------------------------------------------
[2003-03-08 14:41:40] thetaphi@php.net
Also the perl programmers have the same problem:
the version of perl i mentioned before that I had
compiled myself was on an AIX box so it wasn't a fair
test, because when I compiled perl on the sun box
myself I still had the 256 open file limit. I started
poking through perl documentation and found this in
README.solaris
The stdio(3C) manpage notes that only 255 files may be
opened using
fopen(), and only file descriptors 0 through 255 can
be used in a
stream. Since perl calls open() and then fdopen(3C)
with the
resulting file descriptor, perl is limited to 255
simultaneous open
files.
----
So we should choose one of the following possibilities:
a) use only open() and not fopen(), which should be possible beacuse
later in streams.c only the read file descriptor is obtained with
fileno(). Why also use fopen?
b) in solaris use parts of glibc which handles fopen-streams.
------------------------------------------------------------------------
[2003-03-08 06:25:15] thetaphi@php.net
I will test it with PHP5 on out solaris box.
------------------------------------------------------------------------
[2003-03-07 20:01:28] wez@php.net
It's in PHP_4_3 branch.
The problem does not apply to PHP5, as the ZE2 no longer needs to
cast/clone streams.
------------------------------------------------------------------------
[2003-03-07 11:52:36] thetaphi@php.net
wez@thetaphi.net: The fix you explained: Is it also in the 4.3 CVS? Or
only in newest one?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/20274
--
Edit this bug report at http://bugs.php.net/?id=20274&edit=1