Bug#485413: apache2: Apache crashes system due to exessive memory allocation

2008-06-13 Thread Nico Schottelius
Just to update the bug:

I completly disabled ssl on one server, to see whether the ssl module
triggered the bug.

And it did not change the behaviour: So the bug is somewhere else
(so not related to the open ssl-memory-leaks reported on the apache
bugtracker).

I'll soon try the php-package and apache2 from sid on one
webserver and report if anything changes.

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C


signature.asc
Description: Digital signature


Bug#485413: apache2: Apache crashes system due to exessive memory allocation

2008-06-10 Thread Nico Schottelius
Hello Stefan!

Stefan Fritsch [Mon, Jun 09, 2008 at 09:59:10PM +0200]:
> On Monday 09 June 2008, Nico Schottelius wrote:
> > The question is how to debug that problem, find out which modules
> > allocates that much memory (most likely php, but where is the
> > evidence?) and why it allocates so much memory.
> 
> What is the value of memory_limit in your /etc/php5/apache2/php.ini ? 
> If it is large, maybe your php app simply uses that much memory.

[11:52] u0203:apache2# grep memory_limit /etc/php5/apache2/php.ini 
memory_limit = 128M  ; Maximum amount of memory a script may consume
(128MB)

On all four servers, all Debian standardconfigs.

> Php 5.2.6 fixes some memory leaks. You could try 5.2.6-1 from Debian 
> unstable.

Hmm, have to wait until it is in testing, as I don't want
to mix up testing/unstable. Is there a way to get notified,
as soon as it is available?

> Apache is known to leak memory in long requests (like when streaming 
> multimedia data) if the flush() function is used excessively. Do you 
> use implicit_flush in your php.ini? Does your application use 
> ob_implicit_flush() or many flush()s?

[12:08] u0140:~% grep implicit_flush /etc/php5/apache2/php.ini 
implicit_flush = Off

> If nothing helps, you can set MaxMemFree and/or MaxRequestsPerChild in 
> your apache config as a workaround.

I am trying the following hacks currently:
   - MaxRequestsPerChild on server u0203
   - Disabled SSL on server u0141

I did not know about MaxMemFree before your Mail, maybe I'll try
it on the third webserver.

My next step would be to compile apache2.2.8 and php 5.2.6 from
source with debugging symbols and run valgrind in front of it...
hope I don't have to do it, because this implies installing
full developement kit including mysql, postgresql, etc. dev
pakets...

Sincerly

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C


signature.asc
Description: Digital signature


Bug#485413: apache2: Apache crashes system due to exessive memory allocation

2008-06-09 Thread Nico Schottelius
Package: apache2
Version: 2.2.8-4
Severity: critical
Justification: breaks the whole system


And the begins to consume all available memory within about 6 hours.

This is verified on 4 extremly similar setup apaches on Debian Lenny
amd64.

Using pmap on one of the currently bigger apache processes I see that
it has allocated quite much ram:

2b93c38330005848 r-x--  008:1 libphp5.so
00663000  359560 rw--- 00663000 000:0   [ anon ]
mapped: 549860Kwriteable/private: 361796Kshared: 604K

(last lines form from pmap -d 2464 | sort -n -k 2)

The question is how to debug that problem, find out which modules
allocates that much memory (most likely php, but where is the evidence?)
and why it allocates so much memory.

-- Package-specific info:
List of enabled modules from 'apache2 -M':
  alias auth_basic authn_file authz_default authz_groupfile
  authz_host authz_user autoindex cgi dir env mime negotiation php5
  rewrite setenvif ssl status

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apache2 depends on:
ii  apache2-mpm-prefork   2.2.8-4Traditional model for Apache HTTPD

apache2 recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]