Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #37481 : "Memory exhausted" errors cause internal server error rather than E_ERROR
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 13th June 05:41
External User
 
Posts: 1
Default #37481 : "Memory exhausted" errors cause internal server error rather than E_ERROR



ID: 37481
Updated by: tony2001@php.net
Reported By: phpbugs at thequod dot de
-Status: Open
+Status: Closed
Bug Type: CGI related
Operating System: Ubuntu Linux
PHP Version: 5CVS-2006-05-17 (CVS)
Assigned To: dmitry
New Comment:

Fixed -> closed.


Previous Comments:
------------------------------------------------------------------------

[2006-07-19 22:11:18] phpbugs at thequod dot de

It works!

Though it's now a bit too verbose (reference to source
code/zend_operators).


VirtualHost log:

[Thu Jul 20 00:00:04 2006] [error] [client X] FastCGI:
server "/X/php5-fcgi-starter" stderr: PHP Fatal error:
Allowed memory size of 1048576 bytes exhausted
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to
allocate 786358 bytes) in /X/public_html/bug_37481.php on
line 6


Main server error log:
/X/public_html/bug_37481.php(6) : Fatal error - Allowed
memory size of 1048576 bytes exhausted
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to
allocate 786358 bytes)

------------------------------------------------------------------------

[2006-07-19 14:29:39] dmitry@php.net

Could you retest it with current PHP_5_2. New memory manager may fix
this problem.

------------------------------------------------------------------------

[2006-05-24 17:21:18] phpbugs at thequod dot de

I have
log_errors=On (rather than E_ALL)
error_reporting=E_ALL
and
error_log not set.

IF I set error_log to some file, the fatal error gets
logged there:
[24-May-2006 19:11:49] PHP Fatal error: Allowed memory
size of 1048576 bytes exhausted (tried to allocate 6
bytes) in /***/web/test/memory.php on line 10

In the Apache main error.log I then get:
Allowed memory size of 1048576 bytes exhausted (tried to
allocate 44 bytes)
[Wed May 24 19:14:24 2006] [warn] FastCGI:
server "/***/fcgi-scripts/***/php5-fcgi-starter" (pid
2637) terminated by calling exit with status '1'
[Wed May 24 19:14:24 2006] [warn] FastCGI:
server "/***/fcgi-scripts/***/php5-fcgi-starter" (uid
1001, gid 1001) restarted (pid 2767)

and in the VHOST's error log:
[Wed May 24 19:14:24 2006] [error] [client X]
(104)Connection reset by peer: FastCGI: comm with
server "/***/fcgi-scripts/***/php5-fcgi-starter" aborted:
read failed
[Wed May 24 19:14:24 2006] [error] [client X] FastCGI:
incomplete headers (0 bytes) received from
server "/***/fcgi-scripts/***/php5-fcgi-starter"

IMHO, with error_log set it's even more bad: the
fcgi-starter script exits, although I'm using
PHP_FCGI_CHILDREN=4!

report_zend_debug does not seem to make a difference, and
is "On" by default (not in my php.ini?!)

I've just tested it with current CVS PHP_5_1.

------------------------------------------------------------------------

[2006-05-24 11:06:49] dmitry@php.net

Probably this is configuration problem. Try the following directives in
your php.ini

log_errors=E_ALL
report_zend_debug=0

They may satisfy your expectation (work for me).

I cannot reproduce server interanl error and "Connection reset by peer"
and "incomplete headers" messages. Please confirm that you still have
the problem or close the bug.


------------------------------------------------------------------------

[2006-05-17 20:12:31] phpbugs at thequod dot de

Apache does not attach the "in FILE on LINE" to the error
PHP creates!

Re: "mod_fastcgi logs FastCGI application error (stderr)
output to the server log associated with the request.
Errors reported by the FastCGI process manager, fcgi-pm,
are reported to the main server log (typically,


is not FastCGI protocol aware will also be directed to the
main server log."
(http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
it seems that the "memory exhausted" error is "Data
written to stdout or stderr before entering the FastCGI
accept loop or via a mechanism that is not FastCGI
protocol aware".

I also don't see any reason why mod_php would
display/deliver the page that has been processed/created
before this error, but the php-fastcgi returns an invalid
response.

------------------------------------------------------------------------

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/37481

--
Edit this bug report at http://bugs.php.net/?id=37481&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666