Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47449 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38133 invoked from network); 22 Mar 2010 15:41:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2010 15:41:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=hermanradtke@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hermanradtke@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hermanradtke@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-px0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:44404] helo=mail-px0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/84-14451-6AF87AB4 for ; Mon, 22 Mar 2010 10:41:27 -0500 Received: by pxi2 with SMTP id 2so3328807pxi.25 for ; Mon, 22 Mar 2010 08:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=hpebSrGjBXLGEEYblFeTHCkq6qSQL3gDTqIXKm239+c=; b=sE55xk3GfWGeDvLP0SRoFdq050VDKjN0WS7KRZx9xPA27OcOI9plmCTHGAht1CggpU PTlKkUy++P6gKvDxy8Z5UBxq/HPNIxTDeFb4jvoly0hXViEJ+NJYIigGeP2T6WNkKXut pmDlta1Elput6o0KGtyX0QBRLcx9AJNC1agkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uMZY6ZgkZrLIPMT0yyXuMrfIglKYXzbOqsC4Tdb1qSFfF/dz9dkZcvHs9/DOr4I0hi PwMPbmXM4Np16VZKB19METFC9Ph9KTA71cLjwS5w1MVkfC+Teuc9EYpkb+ljiaPeZKKg b10pAk2W7UR5BnRrDLcq8lDuu3u1E75OlU7jU= MIME-Version: 1.0 Received: by 10.141.100.15 with SMTP id c15mr5106333rvm.57.1269272484165; Mon, 22 Mar 2010 08:41:24 -0700 (PDT) In-Reply-To: <98b8086f1003220822s47665f87x696b70e9c13dadbd@mail.gmail.com> References: <98b8086f1003220751j73a8414es89b9b469c46f6630@mail.gmail.com> <1269270852.1575.141.camel@guybrush> <98b8086f1003220822s47665f87x696b70e9c13dadbd@mail.gmail.com> Date: Mon, 22 Mar 2010 08:41:24 -0700 Message-ID: To: troels knak-nielsen , PHP Developers Mailing List Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [PATCH] Raise warning first on "Maximum execution time exceeded" From: hermanradtke@gmail.com (Herman Radtke) > What do you mean by "no option"? Otherwise yes, that's what it does. Using sleep there is not a good practice. Since the custom error handler is triggered, there is no need for the sleep call anyways. > I'm not sure I understand. Are you implying that it is somehow > possible to circumvent the second (fatal) error with this change? How? Consider for a second what you are asking the language to do. The script has run out of memory and instead of halting you want it to switch into an error handler to log the error. What happens when that error handler creates new variables or an object instance? Where does that memory come from? A better solution: generate a warning for scripts that use some target % of memory. I hate to add more ini settings, but for simplicity there could be a "memory_limit_warn" setting which you can set to something like "95%". When a script reaches that memory threshold it can trigger a warning so you can log it. -- Herman Radtke hermanradtke@gmail.com | http://hermanradtke.com