Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 36598 invoked from network); 31 Jan 2007 12:36:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2007 12:36:03 -0000 Received: (qmail 84537 invoked by uid 500); 31 Jan 2007 12:36:03 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 84521 invoked by uid 500); 31 Jan 2007 12:36:02 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 84509 invoked by uid 99); 31 Jan 2007 12:36:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jan 2007 04:36:02 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of tfinney@boygenius.com designates 66.92.81.70 as permitted sender) Received: from [66.92.81.70] (HELO sonata.boygenius.com) (66.92.81.70) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 31 Jan 2007 04:35:53 -0800 Received: (qmail 31802 invoked from network); 31 Jan 2007 12:35:31 -0000 Received: from unknown (HELO CANTATA.boygenius.com) (70.183.11.12) by 0 with SMTP; 31 Jan 2007 12:35:30 -0000 X-No-Archive: yes Message-Id: <4.3.1.2.20070131072304.042d1940@localhost> X-Mailer: Eurtton Mail TRS-80 Date: Wed, 31 Jan 2007 07:35:32 -0500 To: modperl@perl.apache.org From: Todd Finney Subject: Re: Apache::Session::MySQL, light/heavy proxy, wedging In-Reply-To: <66887a3d0701302130y53f68ad8t50c25d3e41008ff2@mail.gmail.co m> References: <4.3.1.2.20070130222327.06c9d8c0@localhost> <4.3.1.2.20070130162414.03bc1780@localhost> <4.3.1.2.20070130222327.06c9d8c0@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org At 12:30 AM 1/31/2007 -0500, Perrin Harkins wrote: >As for what's going wrong, my guess is that it has to do with the >internal redirects that happen when you access / as opposed to >/index.phtml. You are trying to open the session in the >HeaderParserHandler phase, so it's going to open a session, then do an >internal redirect, and try to open the same session again, effectively >deadlocking. Wouldn't throwing a return DECLINED unless $r->is_initial_req; at the top of the handler fix the problem, in that case? >That's a 2.0 doc, but it applies to 1.0 as well: pnotes() increases >the reference count to $session rather than copying it, so it doesn't >get destroyed until after the internal redirect has completed and >pnotes gets torn down. If you use a temporary variable to hold the >_session_id key, this will not happen and that may fix your problem. That occurred to me, and one of the first things that I tried was something like this: my $temp_session=$session{_session_id}; $r->pnotes('SESSION_ID', $temp_session); It didn't change anything, so I decided that either (a) that wasn't the problem, or (b) after years of doing this I *still* don't fundamentally understand references. Either conclusion made me uncomfortable, so I went looking for other potential solutions.