Freakish Windows/Apache/PHP memory leak

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

Phasma Felis
Posts: 175
Joined: Thu May 22, 2008 3:42 am UTC

Freakish Windows/Apache/PHP memory leak

Postby Phasma Felis » Wed Aug 06, 2008 9:52 pm UTC

So our Apache server crashes every few days (up to every few hours, depending on load). The error log contains "[notice] Parent: child process exited with status 3221225477 -- Restarting." There are no common factors in the access log or Windows event log. The most recent time, I had enabled PHP error logging, and found several dozen lines of the form "PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 393216 bytes) in E:\Program Files\xampp\htdocs\xoops\modules\news\article.php on line 482". The amount allocated and the exact location vary, of course.

We're running Apache 2.2.9 and PHP 5.2.6 on Windows Server 2003 (which I just noticed is not up-to-date, presumably because this is an intranet server behind the corporate firewall, but that still needs to be fixed).

I'm kinda out of ideas here. Extensive googling hasn't found any situation that completely matches ours. I can't find exactly what "status 3221225477" means anywhere, although a lot of people seem to be getting that error. We can't replicate it (obviously, it's a memory leak) and most places won't accept bug/error reports without replication code. The most relevant thing I've found is this bug report, particularly the last post, which suggests it's an unfixable Windows problem, but his situation still doesn't match ours (in particular, we don't have Win32DisableAcceptEx set in httpd.conf).

Any suggestions for how I could at least diagnose this? My only other thought is that, if I had a program to track and log Windows process memory usage, I could at least see if something's ballooning, but I haven't been able to find a program like that. Thanks for any help you can give...

Kasperl
Posts: 135
Joined: Mon Jan 14, 2008 5:06 pm UTC

Re: Freakish Windows/Apache/PHP memory leak

Postby Kasperl » Thu Aug 07, 2008 9:55 am UTC

My first instinct would be to check how much memory PHP is allowed to assign, which is set somewhere in php.ini, but that doesn't seem to be the main issue here..
Just another forum newbie, asking all the stupid questions again.

Phasma Felis
Posts: 175
Joined: Thu May 22, 2008 3:42 am UTC

Re: Freakish Windows/Apache/PHP memory leak

Postby Phasma Felis » Thu Aug 07, 2008 2:47 pm UTC

Kasperl wrote:My first instinct would be to check how much memory PHP is allowed to assign, which is set somewhere in php.ini, but that doesn't seem to be the main issue here..

Yah, I suspect that would just delay the onset of the problem. Of course, our current "solution" is a scheduled Apache restart every two hours, so that might still be worth considering.

papkh
Posts: 1
Joined: Mon Sep 22, 2008 7:13 pm UTC

Re: Freakish Windows/Apache/PHP memory leak

Postby papkh » Mon Sep 22, 2008 7:18 pm UTC

Hi,

I'm wondering if you ever found a solution to this problem?
I have Windows 2003, Apache & Php and have a similar problem with high file handles causing an out of non-paged memory error every couple of days.

Thanks,
-PAPKH

Phasma Felis
Posts: 175
Joined: Thu May 22, 2008 3:42 am UTC

Re: Freakish Windows/Apache/PHP memory leak

Postby Phasma Felis » Mon Sep 22, 2008 8:25 pm UTC

Afraid not, sorry. We're certain it's a memory leak in PHP, but even if I knew where I probably wouldn't know how to fix it, and the Apache/PHP community isn't really interested in hunting down elusive bugs in non-Linux versions. I'll let you know if I find anything, but so far the most likely solution seems to be "switch to Linux"...

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: Freakish Windows/Apache/PHP memory leak

Postby '; DROP DATABASE;-- » Thu Sep 25, 2008 3:34 am UTC

3221225477 = 0xC0000005 = Access Violation. The process is trying to access some memory that it shouldn't be. Typically that would mean a dangling pointer, ridiculously wrong array index, or memory corruption. Which probably isn't much help. :-/
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.


Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 7 guests