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 -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Apache 2.4.6.0 crash due to a problem in php5ts.dll 5.5.1.0
Author
AlicanC



Joined: 25 Jul 2013
Posts: 6

PostPosted: Fri 26 Jul '13 8:32    Post subject: Apache 2.4.6.0 crash due to a problem in php5ts.dll 5.5.1.0 Reply with quote

Here goes my first post on this forum:

I am trying to update our production software to the latest stuff:

- Windows Server 2008 Standard SP2 (All recommended updates applied.)
- Apache 2.4.6 (httpd-2.4.6-win32-VC11)
- PHP 5.5.1 (php-5.5.1-Win32-VC11-x86)
- MySQL 5.6.12 (mysql-5.6.12-win32)
- WordPress 3.5.2

I get these crashes time to time which leave this log behind:
Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e43a85, faulting module php5ts.dll, version 5.5.1.0, time stamp 0x51e83970, exception code 0xc0000005, fault offset 0x0000d7d4, process id 0x2ad0, application start time 0x01ce88d76857db55.
Click for details...


Fortunately, this crash doesn't make httpd go down. I guess this just crashes a child process and the process gets created again.
Unfortunately, there is nothing to see about this in any of the logs.

I've searched a lot and I couldn't find any solution. Is this something known? Does anyone know the solution? If not, how can I debug this issue myself? (I can't even file a bug report like this since I can't even reproduce it. It just happens randomly.)

Edit:

Just got another four. This time ntdll.dll joined the crash wagon and completely killed httpd.

Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e43a85, faulting module php5ts.dll, version 5.5.1.0, time stamp 0x51e83970, exception code 0xc0000005, fault offset 0x00040a77, process id 0x1734, application start time 0x01ce89c78eefcd3b.
Click for details...


Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e43a85, faulting module php5ts.dll, version 5.5.1.0, time stamp 0x51e83970, exception code 0xc0000005, fault offset 0x0000d7d4, process id 0x1bd8, application start time 0x01ce89ca4e1d88db.
Click for details...


Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e43a85, faulting module php5ts.dll, version 5.5.1.0, time stamp 0x51e83970, exception code 0xc0000005, fault offset 0x00040a77, process id 0x19e8, application start time 0x01ce89cab128e96b.
Click for details...


Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e43a85, faulting module ntdll.dll, version 6.0.6002.18541, time stamp 0x4ec3e39f, exception code 0xc0000420, fault offset 0x000abc4f, process id 0xeac, application start time 0x01ce89c78e6f79ab.
Click for details...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Fri 26 Jul '13 11:14    Post subject: Reply with quote

That is due a faulty php extension. If you need all the enabled extensions in your php.ini you may use php over fcgid instead of using is as module.

I also recommend to use php error log to maybe figure out what causes the crash.

Here is a link how to use php over fcgid. http://www.apachelounge.com/viewtopic.php?t=2394


if you still have a question please ask again.
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Fri 26 Jul '13 14:45    Post subject: Reply with quote

These are the classic errors you will see when running PHP as an Apache module. We struggled with these errors for months. Switching to using PHP via mod_fcgid (as James recommends) will fix all of these problems. Be sure you have the latest Visual C++ Redistributable package installed:

http://support.microsoft.com/kb/2019667

Also, I recommend switching to the 64-bit version of MySQL. No real reason to run the 32-bit version anymore.
Back to top
AlicanC



Joined: 25 Jul 2013
Posts: 6

PostPosted: Fri 26 Jul '13 16:13    Post subject: Reply with quote

Thanks for all the replies. I was using the module because I read somewhere that it provided more performance. 5 crashes per minute is not great performance. I will switch to FCGI as you suggested.

Since our WordPress installation does everything it can to make creating a development copy harder, I will have to take down the production server midnight and work on it when no one's around.

I'll report the results when I'm done.

Also, Smitty, should I use 64-bit Apache and PHP? (I guess not, but I wanted to ask anyway.)
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Fri 26 Jul '13 17:37    Post subject: Reply with quote

I use apache 64 bit and PHP 32 bit cause I can do it over fcgid Wink
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Fri 26 Jul '13 19:29    Post subject: Reply with quote

PHP X86 is still faster than X64, but that may change over time when PHP X64 becomes less experimental.
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Sat 27 Jul '13 0:39    Post subject: Reply with quote

I recommend Apache 64-bit and PHP 5.5 32-bit. They don't have to match since you're using mod_fcgid. Do be sure to download the 64-bit version of mod_fcgid.
Back to top
AlicanC



Joined: 25 Jul 2013
Posts: 6

PostPosted: Sun 28 Jul '13 17:35    Post subject: Reply with quote

Things are working pretty fine at the moment.

I have two questions/problems:

1- Our uncached WordPress page loads are still slow. We moved from:
Apache 2.2.22, PHP 5.4.3, MySQL 5.5.24
to:
Apache 2.4.6 x64, PHP 5.5.1, MySQL 5.6.12 (Not x64 yet, too lazy Very Happy)

Isn't it right to expect some performance improvements? We didn't have too much improvement if any.

2- Every 5 or 10 minutes, we get this in Event Viewer:
Code:
Faulting application httpd.exe, version 2.4.6.0, time stamp 0x51e441d6, faulting module libapr-1.dll, version 1.4.8.0, time stamp 0x51e4432f, exception code 0xc0000005, fault offset 0x0000000000009070, process id 0x2b1c, application start time 0x01ce8ba41260689b.

There is nothing in the VirtualHost log, but I have alot of these in the general log:
Code:
[Sun Jul 28 18:06:47.492860 2013] [fcgid:error] [pid 215108:tid 216] FastCGI process 89852 still did not exit, terminating forcefully

and a lot of these:
Code:
[Sun Jul 28 18:06:48.492860 2013] [fcgid:info] [pid 215108:tid 216] mod_fcgid: process c:/path-to-php-5.5.1-Win32-VC11-x86/php-cgi.exe(229500) exit(shutting down), return code 9

and then these:
Code:
[Sun Jul 28 18:07:13.876860 2013] [mpm_winnt:notice] [pid 11036:tid 236] AH00363: Child: Terminating 85 threads that failed to exit.
[Sun Jul 28 18:07:13.877860 2013] [mpm_winnt:notice] [pid 11036:tid 236] AH00364: Child: All worker threads have exited.
[Sun Jul 28 18:07:15.611860 2013] [mpm_winnt:notice] [pid 221652:tid 240] AH00362: Child: Waiting 30 more seconds for 4 worker threads to finish.
[Sun Jul 28 18:07:16.296860 2013] [mpm_winnt:notice] [pid 86328:tid 172] AH00428: Parent: child process 11036 exited with status 3221225477 -- Restarting.
[Sun Jul 28 18:07:17.024860 2013] [mpm_winnt:notice] [pid 86328:tid 172] AH00455: Apache/2.4.6 (Win64) mod_fcgid/2.3.7 configured -- resuming normal operations
[Sun Jul 28 18:07:17.024860 2013] [mpm_winnt:notice] [pid 86328:tid 172] AH00456: Apache Lounge VC11 Server built: Jul 15 2013 20:45:22
[Sun Jul 28 18:07:17.024860 2013] [core:notice] [pid 86328:tid 172] AH00094: Command line: 'C:\\path-to-httpd-2.4.6-win64-VC11\\Apache24\\bin\\httpd.exe -d C:/path-to-httpd-2.4.6-win64-VC11/Apache24 -f C:\\path-to-httpd.conf'
[Sun Jul 28 18:07:17.026860 2013] [mpm_winnt:notice] [pid 86328:tid 172] AH00418: Parent: Created child process 216280
[Sun Jul 28 18:07:17.708860 2013] [mpm_winnt:notice] [pid 216280:tid 236] AH00354: Child: Starting 250 worker threads.


My FCGID configuration:
Code:
FcgidInitialEnv PHPRC "c:/path-to-php"
FcgidWrapper "c:/path-to-php-5.5.1-Win32-VC11-x86/php-cgi.exe" .php

# FcgidIOTimeout 40
# FcgidConnectTimeout 10

# FcgidMaxProcesses 300
# FcgidMaxProcessesPerClass 300

# FcgidOutputBufferSize 64
# ProcessLifeTime 0
# FcgidMaxRequestsPerProcess 0
# FcgidMinProcessesPerClass 0
# FcgidFixPathinfo 1
# FcgidProcessLifeTime 0
# FcgidZombieScanInterval 20
# FcgidMaxRequestLen 536870912
FcgidMaxRequestLen 33554432
# FcgidIOTimeout 120
# FcgidTimeScore 3


My mpm_winnt config:
Code:
ThreadsPerChild        250
#MaxConnectionsPerChild   0
MaxConnectionsPerChild   100


I got those FCGID directives from this forum. I didn't want to enable them since I had some doubts about them.
Back to top
Steffen
Moderator


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

PostPosted: Sun 28 Jul '13 17:57    Post subject: Reply with quote

In the mod_fcgid download here is a readme with the default to use config:

FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 500

<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>

FcgidMaxRequestsPerProcess: please read the Special PHP considerations under the heading Examples at : http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

Steffen
Back to top
AlicanC



Joined: 25 Jul 2013
Posts: 6

PostPosted: Sun 28 Jul '13 20:49    Post subject: Reply with quote

Thanks. My "modules-2.4-win64-VC11.zip" didn't contain any information regarding that. I also set "MaxConnectionsPerChild" to "0" and it's been like 50 minutes since I got the last of that error message.

We will face the true test tomorrow though.
Back to top
AlicanC



Joined: 25 Jul 2013
Posts: 6

PostPosted: Tue 06 Aug '13 20:31    Post subject: Reply with quote

We didn't face to true test that tomorrow but today. We went up to 170 active visitors (Google Analytics) and the site worked fine. We couldn't get the full potential from our content before because the site started to crash and slow down when we go above 150 visitors. Now our only bottleneck is the quality of our content Very Happy

Also no errors in Event Viewer since we moved to FCGI and made the proper configurations.

Sweet!

Thanks for all the help Smile
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Tue 06 Aug '13 21:03    Post subject: Reply with quote

I'm happy to hear your system is more stable now. Good luck tomorrow.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 07 Aug '13 0:11    Post subject: Reply with quote

AlicanC wrote:
We couldn't get the full potential from our content before because the site started to crash and slow down when we go above 150 visitors.
Try running an opcode cache. zend_extension=php_opcache.dll
Configuration: https://github.com/zendtech/ZendOptimizerPlus
Back to top


Reply to topic   Topic: Apache 2.4.6.0 crash due to a problem in php5ts.dll 5.5.1.0 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software