Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50910 invoked from network); 22 Mar 2010 15:55:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2010 15:55:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.216 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.216 mail-bw0-f216.google.com Received: from [209.85.218.216] ([209.85.218.216:64752] helo=mail-bw0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/77-14451-E0397AB4 for ; Mon, 22 Mar 2010 10:55:58 -0500 Received: by mail-bw0-f216.google.com with SMTP id 8so293960bwz.23 for ; Mon, 22 Mar 2010 08:55:57 -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:cc:content-type; bh=atSADHkc4XxhoHzSOEkSp6kBxiF0JLixF2MAkz9q8eA=; b=GheNHQucg9fuQIuoBqLXOa3doV+l6roMY5LOMfJOxAzjVdwl6IoUSIjIwpML8Wzecn pxxDAkFJdrHNifwpW0XH01/iZKewKRgJStzJIeGMuPr33+vNLq2zILtZcEtbm7ooRWuW MHRppNVXTt2wNELx2fL4Tn4tJoTF5sV8s48jA= 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 :cc:content-type; b=C5kkS791cU0/4XxCFgxa9n+zPyi01go0YGZXv2qUdJRKfly5FsjWigPeuutwnzWAWJ 9fqTqCu5fku7Gw3M+9cGMmaNB5oHrQ9YnorknZBb5/nBrgj6LFWGyOkMtmypFhA2WrMS R8AicS7yy1dHKa4Du7OK9PCQ+easIrkrV/wqY= MIME-Version: 1.0 Received: by 10.204.33.194 with SMTP id i2mr2266415bkd.140.1269273357617; Mon, 22 Mar 2010 08:55:57 -0700 (PDT) In-Reply-To: References: <98b8086f1003220751j73a8414es89b9b469c46f6630@mail.gmail.com> <1269270852.1575.141.camel@guybrush> <98b8086f1003220822s47665f87x696b70e9c13dadbd@mail.gmail.com> Date: Mon, 22 Mar 2010 16:55:57 +0100 Message-ID: To: Herman Radtke Cc: troels knak-nielsen , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=00032555a0ca9a89b2048265bbcb Subject: Re: [PHP-DEV] [PATCH] Raise warning first on "Maximum execution time exceeded" From: tyra3l@gmail.com (Ferenc Kovacs) --00032555a0ca9a89b2048265bbcb Content-Type: text/plain; charset=UTF-8 On Mon, Mar 22, 2010 at 4:41 PM, Herman Radtke wrote: > > 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? > > The out of memory is a good example, but not the only one. If you reached the memory limit, but the system has available memory, then it should be handled with a soft limit/hard limit. > 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. > you can write that in userland with memory_get_usage. but its just one case from the many. Tyrael > > -- > Herman Radtke > hermanradtke@gmail.com | http://hermanradtke.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00032555a0ca9a89b2048265bbcb--