Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34829 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82705 invoked by uid 1010); 18 Jan 2008 10:25:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82690 invoked from network); 18 Jan 2008 10:25:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2008 10:25:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=scottmac@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=scottmac@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 72.232.140.210 as permitted sender) X-PHP-List-Original-Sender: scottmac@php.net X-Host-Fingerprint: 72.232.140.210 midden.org.uk Received: from [72.232.140.210] ([72.232.140.210:59887] helo=lovelace.midden.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/B8-18592-5AE70974 for ; Fri, 18 Jan 2008 05:25:44 -0500 Received: from office.vbulletin.com ([217.155.246.60] helo=[10.0.0.116]) by lovelace.midden.org.uk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JFoPp-0006eY-TC; Fri, 18 Jan 2008 10:25:38 +0000 Message-ID: <47907E9A.9070401@php.net> Date: Fri, 18 Jan 2008 10:25:30 +0000 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Michael B Allen CC: internals@lists.php.net References: <78c6bd860801172346tab2dd81p841511ee07d15a5e@mail.gmail.com> In-Reply-To: <78c6bd860801172346tab2dd81p841511ee07d15a5e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Asymmetric Module Init / Deinit From: scottmac@php.net (Scott MacVicar) Apache children get killed and re-spawned after the number of requests defined by MaxRequestsPerChild, the default is 10,000. Though MINI talways get called for each child spawned. Is Apache using pre-fork or worker? Scott Michael B Allen wrote: > I have someone using my extension who is seeing some strange behavior > where the module initializes which Apache starts, the extension works > perfectly and then, without warning, after about 40 seconds, the > deinitialization routine runs. This kills some state in a global > context and everything goes very badly from there. Otherwise, Apache > is still running just fine. > > The setup is Apache 2.2 / PHP 5.2 on Fedora 7. > > I personally have not been able to replicate this problem but I'm > thinking it must be an Apache worker exiting that's triggering deinit. > I know Apache 1.x has that behavior and I'm wondering if anyone knows > if 2.2 exhibits that behavior. It's annoying because it means that the > module initialization is called once whereas the deinitialization > routine is called many times. > > Does this sound familiar to anyone? > > I would appreciate any insight as to how I can ensure that my module > is deinitialized only once. My first thought is to simply save the pid > of the process that initialized the module and check for it in the > deinitialization routine. > > Mike >