Running Apache + PHP + Accelerators under Windows 2003
I have been getting some instability running Apache with PHP + Accelerators under Windows 2003. I will log my finds in this article. Visit regularly for updates. I ended up running 7 Apaches on a Windows 2003 Server to test all different kinds of configurations. Recently because it was becoming complex, I started logging my finds. This page is probably for the hardcore debugging type...
Mitigating factors:
- Most crash seem to happen because of load (with very low traffic you might
never experience problems).
- My PHP applications are very demanding. Especially Gallery2 which relies on
external libraries for processing images. Again other PHP applications might not
experience these problems.
-If you have issues with IIS, these finding might also be applicable.
Configuration that appear to be stable:
Apache 2.2.3 + PHP 4.3.11 + ApacheLounge PHP connector +
eAccelerator 094 Sitebuddy_v2 for PHP 4.3.11
It's been 1 week now (9/21) with 2 sites running just fine. On instable "software stack" just 1 of these sites would crash multiple times per day.
Apache 2.0.59 + PHP 4.4.4 +APC accelerator (3011): Weird blank pages in VBulletin if
setting apc.stat=0
very rare crash trying auto_globals_jit=On (with other 3 "register" Off)
as been stable since nearly 1 week
Apache 2.0.59 + PHP 5.1.6 + APC_3012_SiteBuddy:
Weird blank pages in VBulletin if setting apc.stat=0
Configuration that are possibly stable at this point:
Apache 2.0.59 + PHP 5.1.6 + xcache(1.0.2 re-released): very little load on this server
Apache 2.0.59 + PHP 4.3.11 +
APC accelerator (3011): Weird blank pages in VBulletin if
setting apc.stat=0
Apache 2.0.59 + PHP 516: very little load, so might not be accurate
Apache 2.2.3 (not using the new cache feature) + PHP 4.3.11 + ApacheLounge PHP
connector
Apache 2.2.3 (with new cache feature) + PHP 5.1.6 + ApacheLounge PHP connector: very little load, so
might not be accurate
Configuration that are instable (note: I run "heavy" PHP sites (Drupal +
Gallery2):
Apache 2.0.59 + PHP 4.4.4 + xcache(1.0.1RC1): rare crash
Apache 2.0.59 + PHP 4.4.4 + xcache(1.0.2): rare crash (testing Apache
2.0.59 with PHP 5.1.6 now)
Apache 2.0.59 + PHP 5.1.6 + APC_3012: does not even enable the loading of a
Drupal + Gallery2 site.
Apache 2.2.3 (not even using the new cache feature) + PHP 5.1.6
Apache 2.2.3 (using the new cache feature) + PHP 4.3.11 + ApacheLounge PHP
connector: weird missing style sheet issue (Drupal + G2 site)
Got mixed results (need to look into details setting differences). Could also be
due to the difference PHP extensions used.
Apache 2.0.59 + PHP 4.4.4: crash
Details (personal notes):
1)
| Apache 2.0.59 PHP 4.4.4 Crashed | Apache 2.0.59 PHP 4.4.4 No crash |
| httpd.conf contained these extra directives: Timeout 300 KeepAlive On MaxKeepAliveRequests 256 KeepAliveTimeout 10 UseCanonicalName Off AccessFileName .htaccess ServerTokens Prod ServerSignature Off HostnameLookups Off |
|
| php.in diffs: output_buffering = On zlib.output_compression = Off auto_globals_jit = On enable_dl = Off |
output_buffering = 524288 auto_globals_jit = Off enable_dl = On |
2) This difference is most likely due to "Apache 2.2.3 PHP 5.1.6 No crash"
has practically no traffic. Logging what I got just in case.
| Apache 2.2.3 (cache_module OFF) PHP 5.1.6 Crashed | Apache 2.2.3 (cache_module ON) PHP 5.1.6 No crash |
| enable_dl = On | enable_dl = Off |
Stable software stack...
Again the following data is "draft" data. It's a collection of findings as I go...
I made the follow two configs more stable (no crash since):
Apache 2.0.59 + PHP 5.1.6 + APC_3012_SiteBuddy
&
Apache 2.0.59 + PHP 5.1.6 + xcache(1.0.2)
with:
+using spare PHP516 DLL (10 addtional PHP DLLs) in the Apache bin folder
+increased threads to 512
I will roll this data in the above article once these 2 configs prove themselves a little longer...
What is "new cache
What is "new cache future"?
I have very high load server(200.000 hit per day) on Apache 2.2.3, eaccelerator from sitebuddy (0.9.5r) and php 4.4.3 and Windows 2003.
Server never crash (but I have 1-5 times per day apache error "Parent: child process exited with status 3221225477 -- Restarting.").
Apache + PHP + Accelerator on W2k3 stability
"new cache feature": Apache 2.2.3 comes with built-in caching (mod_cache.so). Starting with Apache 2.2.3 the caching feature is suppose to be production grade.
I count as a crash when Windows generates a file in the folder C:\WINDOWS\PCHEALTH\ERRORREP\UserDumps
it will also produce the line (Parent: child process exited with status 3221225477 -- Restarting.) in the Apache error.log
This is a feature you might have turned off on your Windows 2003 Server.
Most of these crash are transparent (they do not impact the site). You just noticed a 15s delay while it is creating the ~20MB dump file. You are probably experiencing these "crash" without noticing it.
Although you get some decent traffic your PHP application might not be as heavy as a "Drupal + Gallery" 2 site. That probably explains why you get only 5 (Parent: child process exited with status 3221225477 -- Restarting.). If you are sure your site has no further problems no worry to have.
However the fact that you have un-explained lines in your error.log could be a cause of concern. In the future you might experience more erratic behavior. Maybe today, some of your user do, without you knowing ?
Some configurations are more stable then others. Since I started tracking the "dumps" I pretty much got all my Apache stable, now since days (no dumps or none of these "Parent: child process exited with status 3221225477 -- Restarting" ...).
Once I feel all my stuff is very stable, I will start exploring new combinations.
If you don't mind sharing:
Do you think you application is PHP "heavy" (like Drupal or Gallery 2) ?
Did you set any httpd.conf directive to a none default value ?
Did you set any php.ini directives to a none default value ?
Specifically what do you have for:
output_buffering =
allow_call_time_pass_reference =
memory_limit =
variables_order =
register_globals =
register_long_arrays =
register_argc_argv =
auto_globals_jit =
Thanks,
Chris
PS: These "crash" could be related to image rendering. I'm not positive about that at all, just a guess.
Hi!My site
Hi!
My site (www.securitylab.ru) used bitrix site manager (www.bitrix.com).
output_buffering = 4096
allow_call_time_pass_reference = off
memory_limit = 128
variables_order = "GPCS"
register_globals = off
register_long_arrays = (not define, this Available since PHP 5.0.0)
register_argc_argv = off
auto_globals_jit = not define (may be only in php 5.x?)
and I use
zlib.output_compression = On
zlib.output_compression_level = 1
P.S. When i used eaccelerator 0.9.4 my Apache was crash 5-10 time in week and must to restart manually.


delicious
digg
reddit
google
technorati
how can i encode php source by eacclerator?
how can i encode php5.2.4 source by eacclerator? and the encoded page can run under windows in go order?