Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94566 invoked from network); 24 Aug 2008 14:19:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2008 14:19:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:40452] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/AA-22001-EFD61B84 for ; Sun, 24 Aug 2008 10:19:43 -0400 Received: from MBOERGER-ZRH.corp.google.com (12-156.106-92.cust.bluewin.ch [92.106.156.12]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 898D111F0A2; Sun, 24 Aug 2008 16:19:39 +0200 (CEST) Date: Sun, 24 Aug 2008 16:16:49 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <718401811.20080824161649@marcus-boerger.de> To: Guido CC: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] php-cgi: cgi_main.c => max_requests = 500? From: helly@php.net (Marcus Boerger) 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