logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: PHP :: Apache crashing and restarting every five minutes
Author
bkidney



Joined: 25 Oct 2016
Posts: 1
Location: USA, Portland

PostPosted: Tue 25 Oct '16 21:57    Post subject: PHP :: Apache crashing and restarting every five minutes Reply with quote

Haven't been able to figure this one out and was wondering if anyone else had any information as to what the problem might be. Here is what the log file reports:

[Tue Oct 25 10:30:15.691375 2016] [mpm_winnt:notice] [pid 1328:tid 564] AH00428: Parent: child process 4876 exited with status 3221226356 -- Restarting.
[Tue Oct 25 10:30:15.972629 2016] [mpm_winnt:notice] [pid 1328:tid 564] AH00455: Apache/2.4.23 (Win64) OpenSSL/1.0.2j PHP/7.0.12 configured -- resuming normal operations
[Tue Oct 25 10:30:15.972629 2016] [mpm_winnt:notice] [pid 1328:tid 564] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:43:51
[Tue Oct 25 10:30:15.972629 2016] [core:notice] [pid 1328:tid 564] AH00094: Command line: ...DELETED...
[Tue Oct 25 10:30:15.972629 2016] [mpm_winnt:notice] [pid 1328:tid 564] AH00418: Parent: Created child process 3148
[Tue Oct 25 10:30:16.441359 2016] [mpm_winnt:notice] [pid 3148:tid 492] AH00354: Child: Starting 64 worker threads.

If you notice, Apache exited with status 3221226356 which in hex is 0xC0000374 which stands for STATUS_HEAP_CORRUPTION in Windows.

I have Googled the issue and a wide array of fixes and problems appear.

Downgrading PHP to version 5.6.27 (VC11) makes the issue go away. This makes me suspect there is a memory leak or bug in PHP 7. However, since PHP 7 runs on VC14 instead of VC11, I am not sure if this is related to Apache or PHP. The Windows event log shows this:

Faulting application name: httpd.exe, version: 2.4.23.0, time stamp: 0x5776399f
Faulting module name: ntdll.dll, version: 6.3.9600.18438, time stamp: 0x57ae642e
Exception code: 0xc0000374
Fault offset: 0x00000000000f1b70
Faulting process id: 0x130c
Faulting application start time: 0x01d22ee55b9377d3
Faulting application path: ...DELETED...\Apache\bin\httpd.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: b0711bfe-9ad8-11e6-8145-0a64f0b51ad5
Faulting package full name:
Faulting package-relative application ID:

The faulting module is ntdll.dll which might suggest an error in the installation of windows. If that were the case, why then would the error go away with PHP 5.6 and not PHP 7?

Any thoughts or help would be much appreciated.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 26 Oct '16 10:15    Post subject: Reply with quote

Yes, look like an PHP issue.

Mostly an extension is causing it. Do you use a non PHP extension (third party) ?

Advised is to run php with fast cgi (mod_fcgid).

FCGI(mod_fcgid) memory usage of Apache is less en the Speed is on par when running as module. There are advantages to running PHP with FCGI. Separating the PHP code from the web server removes 'bloat' from the main server, and improves the performance of non-PHP requests. Secondly, having one permanent PHP process as opposed to one per apache process means that shared resources like persistent MySQL connections are used more efficiently. And maybe even more important is stability, since I run FCGI my server never crashed primarily caused by php (extension) errors and out of memory errors.
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Wed 26 Oct '16 15:04    Post subject: Reply with quote

I've actually started getting these same errors since updating to the latest release of mod_http2.

During high traffic, I keep seeing:
Parent: child process 15184 exited with status 3221225477 -- Restarting.

The Windows event viewer has:
Faulting application name: httpd.exe, version: 2.4.23.0, time stamp: 0x5776399f
Faulting module name: mod_http2.so, version: 2.4.23.0, time stamp: 0x57f37fa4

I reverted back to the previous mod_http2 release and it doesn't crash.
Back to top
icing



Joined: 22 Sep 2015
Posts: 41
Location: Münster, Germany

PostPosted: Wed 26 Oct '16 16:51    Post subject: Reply with quote

The current, bleeding edge mod_http2 from github, e.g. the 1.7.x releases, have at least one unfound bug with segmentation fault. See ticket https://github.com/icing/mod_h2/issues/119.

This does not happen in the v1.6.2 which is the most stable version for now.
Back to top
akartalos



Joined: 22 Feb 2017
Posts: 1
Location: Greece, Athens

PostPosted: Wed 22 Feb '17 9:44    Post subject: Reply with quote

I have exactly the same problem with same configuration under Windows Server 2012 R2 as reported initially by bkidney.

The causing of the restart as reported in error.log is:

[mpm_winnt:notice] [pid 6752:tid 504] AH00428: Parent: child process 7024 exited with status 3221226356 -- Restarting.

Windows event log report:

- EventData
httpd.exe
2.4.18.0
5667fd57
ntdll.dll
6.3.9600.18438
57ae642e
c0000374
00000000000f1b70
1b70
01d28cc198b6d1cf
C:\Apache24\bin\httpd.exe
C:\Windows\SYSTEM32\ntdll.dll
b9b6d897-f8c9-11e6-80c5-001dd8b72461

The problem appears randomly.
I suspect that the problem is caused somehow when we have large memory handling on the PHP program causing overflow that is not handled by windows but can not figure out where and how.
Any more ideas or possible fixes?
Back to top


Reply to topic   Topic: PHP :: Apache crashing and restarting every five minutes View previous topic :: View next topic
Post new topic   Forum Index -> Apache