php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18523 httpd Memory consumption with new PHP
Submitted: 2002-07-24 01:57 UTC Modified: 2002-12-04 18:16 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: tomki at alink dot net Assigned:
Status: No Feedback Package: Apache related
PHP Version: 4.2.2 OS: BSDI 4.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tomki at alink dot net
New email:
PHP Version: OS:

 

 [2002-07-24 01:57 UTC] tomki at alink dot net
Apache 1.3.26 with mod_ssl is the webserver.  DSO support.
I have PHP 4.1.2 configured like so, which does not cause this memory problem: './configure --with-mysql  --with-apxs=/usr/local/web/apache/bin/apxs'

I currently have configured PHP 4.2.2 like so:
./configure --with-regex=php --enable-memory-limit --with-mysql=/usr/local/mysql --with-imap=../imap-2002.RC2 --with-imap-ssl --with-ttf --with-gd --enable-ftp --with-bz2=/usr --with-zlib --with-openssl --with-apxs=/usr/local/web/apache/bin/apxs --with-freetype-dir=/usr/local  --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-pear --with-mm

and as soon as I install the new libphp4.so, and restart apache...  the new httpd processes dominate all the CPU time.  Not hideously badly, but enough so I can't let it continue.  The load goes to 7 or 8 and stays there.  
The issue goes away when the older module is replaced.
There are no compile or make errors printed that I've noticed.
What can I do to resolve this?  Is this a known problem with a certain combination of modules?
Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-24 19:36 UTC] sniper@php.net
First try with ONLY --with-apxs option. And that works, then add the options you had one by one and see after which one it starts to do this. Also, try this snapshot:

http://snaps.php.net/php4-latest.tar.gz
 [2002-07-27 20:44 UTC] msopacua at idg dot nl
I'm pretty sure this is a dupe of:
http://bugs.php.net/bug.php?id=14870

tomki: Can you strip the GD stuff?

Instead of SIGUSR1 use SIGHUP and tail the error log, looking for "child [pid] still didn't exit" errors.

It's SOME dl issue with BSDi, but I still haven't figure it out either.

As a side note: all this goes away when you compile as a static module. If you're tight on memory, be sure to strip httpd manually after install, saves a meg or so, depending on the modules of course.
 [2002-07-29 14:59 UTC] tomki at alink dot net
msopacua:
  It's actually not GD.  It's IMAP.
Initially I attempted to use the latest RC2, and began seeign this problem..  I've tried the 2000c and 2001a since, but no dice.  I've tried it with nothing but IMAP + mysql + apxs..  within a minute there are btwn 3 and 5 httpd processes consuming 98% of the CPU.
A problem I'm having that may be related??
The UW imapd compilation does not generate .so libraries..  and php complains after the MAKE if the dynamic libraries are not present.  I can make them manually in the c-client directory, with 'gcc -shared -o c-client.so *.o'..  
At that point the PHP compile does not complain..
 [2002-07-29 19:50 UTC] sniper@php.net
You're actually NOT supposed to compile with shared c-client. Just let us know WHAT the error is when you try
to compile with the static c-client.

 [2002-07-29 20:17 UTC] tomki at alink dot net
Hunh, ok.  Here's why I thought differently:


*** Warning: This library needs some functionality provided by -lc-client.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
Making all in pear
 [2002-07-29 20:22 UTC] sniper@php.net
Did this happen with this snapshot:

http://snaps.php.net/php4-latest.tar.gz

???

 [2002-07-29 21:06 UTC] tomki at alink dot net
It does not happen with that snapshot.  However, libphp4.so is not built..  and the 'make install' fails because that isn't found.  :)
 [2002-07-30 05:40 UTC] msopacua at idg dot nl
verified, with update gcc (2.95.3) up-to-date autotools and (g)make, against HEAD cvs.

I'm working on a libtoolized version of the imap c-client. Maybe we should fork that one as well? Especially since it will be quite some time, before Apache 2 has static module support.

tomki: if you need imap, there's no other way then compiling php as a static module.
 [2002-09-07 01:10 UTC] tomki at alink dot net
Is this fixed in 4.2.3?
 [2002-09-07 07:16 UTC] yohgaki@php.net
> Is this fixed in 4.2.3?

I don't know :)
Try 4.2.3 and report result back.
 [2002-09-08 03:36 UTC] tomki at alink dot net
Ok
No, it isn't.
Same issue of wanting a shared libc-client library.
I tried the snapshot, and it didn't complain about that, but failed during the make install. (I forget where, I'll try another snapshot in a couple days)
 [2002-09-26 19:51 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-09-27 01:42 UTC] tomki at alink dot net
Did not work; didn't generate the .so

su# make install
Installing PHP SAPI module
[activating module `php4' in /usr/local/web/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/local/web/apache/libexec/libphp4.so
cp: libs/libphp4.so: No such file or directory
apxs:Break: Command failed with rc=1
*** Error code 1
 [2002-09-28 22:47 UTC] sniper@php.net
Is there anything in .libs/ or libs/ directory?

 [2002-09-28 22:57 UTC] tomki at alink dot net
su# ls libs/
libphp4.a       libphp4.la
su# ls .libs/
libphp4.a       libphp4.la      libphp4.lai
 [2002-11-24 23:35 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-04 18:16 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC