On 29/07/2008, at 04:58 AM, Michael Peters wrote:
Mark Stosberg wrote:
the different process_id (2461, 2780) means they are two different
connections ?
I think that's right. I'm not a FastCGI user, but it's my
understanding that you would need a
variable to be at least package-scoped for i
On 07/28/2008 01:30 PM, Mark Stosberg wrote:
>>> If I'm right, then something like this would stay shared:
>>>
>>> our $dbh = DBI->connect(...);
>>> $self->dbh_config($dbh);
>> But don't do that. It's just asking for problems. DB connections *will*
>> go stale. If that happens your application w
> > If I'm right, then something like this would stay shared:
> >
> > our $dbh = DBI->connect(...);
> > $self->dbh_config($dbh);
>
> But don't do that. It's just asking for problems. DB connections *will*
> go stale. If that happens your application will stop working with
> strange errors and o
Mark Stosberg wrote:
the different process_id (2461, 2780) means they are two different
connections ?
I think that's right.
I'm not a FastCGI user, but it's my understanding that you would need a
variable to be at least package-scoped for it to be share.
If I'm right, then something like t
> I just write a small C::A script which used C::A::Plugin::DBH,
> I just use $self->dbh_config(dsn, user, pass); in cgiapp_init(),
> and the script runs as fastcgi on apache with C::A::Dispatch,
>
> but when I use ab to benchmark the script,
> the db connection seems not be cached:
>
> mysql> sh