Re: php-cgi: cgi_main.c => max_requests = 500?
| From: | Marcus Boerger | Date: | Sun, 24 Aug 2008 14:16:49 +0000 |
| Subject: | Re: php-cgi: cgi_main.c => max_requests = 500? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40074@lists.php.net to get a copy of this message | ||
Hello Guido,
Sunday, August 24, 2008, 3:51:19 PM, you wrote:
> Hi all,
> I am new to PHP and to this forum.
> I was testing my webserver with PHP and found out that after 500
> requests the php-cgi process finished (without cores). I ran it with
> valgrind and no memory leaks :). I thought it couldn't be a coincidence
> that, always, after 500 requests, php-cgi finished; so I have had a look
> at cgi_main.c and found:
> max_requests = 500;
> I have seen that the environment variable: PHP_FCGI_MAX_REQUESTS might
> be used to override this value; why php-cgi has to finish after n requests?
It is a common habit to reload the binary after a given number of requests.
This prevents memory leaks and other esource issues.
Best regards,
Marcus