Re: apache process going wild...
- From: Jason Bourne <j_bourne_treadstone@xxxxxxxxxxx>
- Date: Tue, 08 Apr 2008 21:37:15 GMT
Johny C. Buzz wrote:
Hello,
I have a small FreeBSD 6.3 R server with 1Go of RAM and 5Go of swap. No
X enviroment, just the basic PHP5, apache 2 and Berkley DBXML database
with few other small programs...
The native XML database is loaded with a 60Mb XML file and a PHP form
enables request on the data passing XML (xpath) queries. My problem is
that a simple query translate sometime in a 130-140Mb of RAM used by one
HTTPD process without giving the RAM back to the system. 3 or 4 process
like that and apache is out of memory, leaving any new request with and
error and no results...
The request made with PHP is of 2 kind:
1) make a list of everything, no cretiria... we show the firt 200
products... the apache process grows with the search into DBXML and
becomes 130Mb but 10 secondes later, goes back to be few kb... the web
pages is showing the results... everything perfect!
2) make a list but with products that cost less than X and from this Y
supplier... we show the firt 200 products (if more than)... the apache
process grows with the search into DBXML (same data) and becomes 130Mb
but 10 secondes later, the web pages is showing the results, the query
is over BUT the apache process is still stuck to 130Mb... after few
request like that, no new queries are possible...
I have no clue to what is the cause... the PHP code is identical in both
form, the same XML database, the only deference is few extra cretiria in
the query... what is the link between that and apache... ?
How to make sure after the query that the buffer will be flushed? But I
guess it's not normal to terminate a process like that! I dont want a
fix but a cure!
Thank you for any advice...
Bye
--
Johny
You might try adding this to your code:
http://us.php.net/manual/en/function.apache-child-terminate.php
-Jason
.
- References:
- apache process going wild...
- From: Johny C. Buzz
- apache process going wild...
- Prev by Date: Re: apache process going wild...
- Next by Date: Re: Upgrading to freebsd 7.0
- Previous by thread: Re: apache process going wild...
- Next by thread: Re: Need help to understand strace output
- Index(es):
Relevant Pages
|