[PHP-BUG] Bug #51466 [NEW]: zlib.output_compression gets disabled on some processes

[email protected] ("radek at pinkbike dot com") Fri, 2 Apr 2010 22:09:00 +0200 (CEST)
Newsgroups php.bugs
Message-ID <[email protected]>
From:             
Operating system: Centos 5.3 x86_64
PHP version:      5.2.13
Package:          Output Control
Bug Type:         Bug
Bug description:zlib.output_compression gets disabled on some processes

Description:
------------
PHP 5.2.13 
Linux r56 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64
x86_64 
x86_64 GNU/LinuxApache/2.2.3 (CentOS) mod_ssl/2.2.3
OpenSSL/0.9.8e-fips-rhel5


On a fairly busy server, (50 php req/s) we see that some processes stop 
compressing page output.  I have narrowed it down to where a process pid
which 
transitions to this state, remains in this state until recycled/restarted 
(MaxRequestsPerChild reached).
In this state, where gzip is not working, output headers do not contain
Content 
encodign gzip, so the output is fine.  It's just not using compression.

So when all processes are restarted, page compression works correctly for
some 
indeterminate time, after which, some processes transition to a state where
they 
do not compress the output. Once in this state a process ALWAYS ignores the

compression until recycled.

Some additional info:
We only run a max limit of 100 processes, and typically active processes
are 
about 20 or so.
I have decreased MaxRequestsPerChild to about 40,000 which recycles
processes 
every 2 hours or so, and we still see about 50% of our pages delivered
without 
compression.



Expected result:
----------------
The problem happens with zlib.output_compression on.  If I use
output_handler = 
ob_gzhandler, compression never degrades, and it works as expected.


Actual result:
--------------
I am not sure what the trigger is but would like to help solve this issue. 
If 
someone can give me some insight into this I can debug further.



-- 
Edit bug report at http://bugs.php.net/bug.php?id=51466&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51466&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51466&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51466&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51466&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51466&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51466&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51466&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51466&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51466&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51466&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51466&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51466&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51466&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51466&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51466&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51466&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51466&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51466&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51466&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51466&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51466&r=mysqlcfg