Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38910 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8933 invoked from network); 11 Jul 2008 09:35:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2008 09:35:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:55439] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/12-26741-75927784 for ; Fri, 11 Jul 2008 05:35:19 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id A926F414400F; Fri, 11 Jul 2008 09:35:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6hNWJDyRL+R2; Fri, 11 Jul 2008 11:35:16 +0200 (CEST) Received: from [192.168.80.139] (unknown [195.226.16.50]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 4EC74414400C; Fri, 11 Jul 2008 11:35:16 +0200 (CEST) Cc: internals@lists.php.net Message-ID: <657EF460-CBD3-4A03-8B93-7E98C46C8C9B@pooteeweet.org> To: Richard Krehbiel In-Reply-To: <19b0b5c00807100543o50773d26hb7f429e348991191@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928) Date: Fri, 11 Jul 2008 11:33:46 +0200 References: <19b0b5c00807100543o50773d26hb7f429e348991191@mail.gmail.com> X-Mailer: Apple Mail (2.928) Subject: Re: [PHP-DEV] persistent sockets need help From: mls@pooteeweet.org (Lukas Kahwe Smith) On 10.07.2008, at 14:43, Richard Krehbiel wrote: > Here's the big part: I was thinking that a semantic change to > persistent > sockets might make it easier for scripts to work "correctly" without > bothering them too much. The change is this: If a script doesn't > "fclose" > it's "pfsockopen"ed socket, it gets closed *for real* when the > script ends. > > I suggest this because I think it would make scripts "just work" in > the > presence of failures, even if the script coder doesn't completely > understand > the principle; it makes the transaction boundaries "automatic". The > down > side is that, if a script forgets the fclose, things work but it > doesn't > recycle sockets, it makes new ones all the time. > > The other down side is that for old scripts that never had an fclose > in > them, they stop getting recycled pfsockets until the fclose is added. > > I'm going to do *something* about this myself, anyway. I'd really > like it > if a solution were adopted into the main code base. I think this might generally be a solution to make persistent connections less error prone in PHP. This includes database extensions as well. However it does strike me as something that should be done in a major PHP version .. regards, Lukas Kahwe Smith mls@pooteeweet.org