You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Stathy G. Touloumis" <st...@edventions.com> on 2002/03/26 00:44:13 UTC

Apache::Session

Has anyone ran into issues with data being written to the data source using
Apache::Session::Store::DB_File and Apache::Session::Lock::File?  We are
running into a unique instance where a value is not being saved to the
session store at a certain point through a workflow.  There are multiple
frames which are making requests but only one frame makes the request to the
server which runs code to write to the Session store.  We do have
KeepAlive's enabled so I don't think there should be any contention issues
when attempting to write to the store.  Nevertheless this still seems like
the only reason this might be happening.

Apache 1.3.22
mod_perl 1.26
Apache::Session 1.54

Thanks,



Re: Apache::Session

Posted by Perrin Harkins <pe...@elem.com>.
Stathy G. Touloumis wrote:
>>You need to do some more debugging.  Problems with Apache::Session are 
>>usually due to scoping, so put in some debug statements to see that the 
>>session objects for the IDs having trouble are getting properly cleaned 
>>up (i.e. DESTROY is getting called).  It is possible to have problems 
>>with DB_File if it doesn't get untied after each request.
> 
> 
> Wouldn't the issue above (untie) be alleviated by restarting apache?

Probably.  There are some strange situations you can get into with 
DB_File if you don't untie (due to caching and lost updates), but you're 
right that the file locks would probably make the system hang if the 
session wasn't getting cleaned up.

I don't know what else could be causing your problem, but I would still 
suggest trying Apache::Session::File as a potential fix.

- Perrin


RE: Apache::Session

Posted by "Stathy G. Touloumis" <st...@edisonaffiliates.com>.
> You need to do some more debugging.  Problems with Apache::Session are 
> usually due to scoping, so put in some debug statements to see that the 
> session objects for the IDs having trouble are getting properly cleaned 
> up (i.e. DESTROY is getting called).  It is possible to have problems 
> with DB_File if it doesn't get untied after each request.

Wouldn't the issue above (untie) be alleviated by restarting apache?


RE: Apache::Session

Posted by "Stathy G. Touloumis" <st...@edisonaffiliates.com>.
> You need to do some more debugging.  Problems with Apache::Session are
> usually due to scoping, so put in some debug statements to see that the
> session objects for the IDs having trouble are getting properly cleaned
> up (i.e. DESTROY is getting called).  It is possible to have problems
> with DB_File if it doesn't get untied after each request.

In my experience when untie is not called the request usually hangs.  It
seems odd that it would be isolated to just a few workstations though.  Is
it possible that the issue can be isolated to a child instance even with
different ID's?

Thanks for the response : )


Re: Apache::Session

Posted by Perrin Harkins <pe...@elem.com>.
Stathy G. Touloumis wrote:
> It seems unlikely that the DB_File gets corrupted as a new key is created
> and no other workstation seems to run into this problem.
>
> If anyone has any ideas please let me know,

You need to do some more debugging.  Problems with Apache::Session are 
usually due to scoping, so put in some debug statements to see that the 
session objects for the IDs having trouble are getting properly cleaned 
up (i.e. DESTROY is getting called).  It is possible to have problems 
with DB_File if it doesn't get untied after each request.

Another possiblity is to switch to the File store for a while and see if 
that fixes the problem.

- Perrin




Apache::Session

Posted by "Stathy G. Touloumis" <st...@edisonaffiliates.com>.
Hi,

I am running into an issue which does not occur frequently and cannot be
easily duplicated but nevertheless causes issues for the client application.
Enviro :
Apache 1.3.22
mod_perl 1.2.6
mod_ssl 2.8.5
Apache::Session 1.54 ( Store::DB_File, Lock::File )

We provide an application for educational services.  This application
resides on a server which typically only 30 users will connect to at a time
from a lab.  Every so often a few computers (2-3) run into session issues.
When checking the error logs it appears that :
1) A new session is successfully created
2) The session key is encrypted
3) The key is successfully sent to the browser
4) The browser sends the key back
5) Error : The object does not exist in the store

Currently, we have not fully tested different scenarios on how to solve the
issue.  We restarted apache which did not work, only removing the
Session::Store::DB_File file and restarting apache alleviates the issue.

It seems unlikely that the DB_File gets corrupted as a new key is created
and no other workstation seems to run into this problem.

If anyone has any ideas please let me know,


RE: Apache::Session

Posted by "Stathy G. Touloumis" <st...@edventions.com>.
Thanks for responding . . .

Not sure what else you need.  Destroying session objects?  Do you mean to
untie the session $obj?  This is done at the end of each request via untie
( untie(%$obj) ).  I have noticed behavior where when attempting to delete a
session object ( tied(%$obj)->delete ) I get a 'false' value returned which
I cannot figure out why.

> > Has anyone ran into issues with data being written to the data
> source using
> > Apache::Session::Store::DB_File and Apache::Session::Lock::File?  We are
> > running into a unique instance where a value is not being saved to the
> > session store at a certain point through a workflow.  There are multiple
> > frames which are making requests but only one frame makes the
> request to the
> > server which runs code to write to the Session store.  We do have
> > KeepAlive's enabled so I don't think there should be any
> contention issues
> > when attempting to write to the store.  Nevertheless this still
> seems like
> > the only reason this might be happening.
> >
> > Apache 1.3.22
> > mod_perl 1.26
> > Apache::Session 1.54
>
> Could you give a little more detail please?  Lots of people have lots of
> problems with Apache::Session, but it always comes down to not
> destroying Session objects.


Re: Apache::Session

Posted by "Jeffrey W. Baker" <jw...@acm.org>.
On Mon, 2002-03-25 at 15:44, Stathy G. Touloumis wrote:
> Has anyone ran into issues with data being written to the data source using
> Apache::Session::Store::DB_File and Apache::Session::Lock::File?  We are
> running into a unique instance where a value is not being saved to the
> session store at a certain point through a workflow.  There are multiple
> frames which are making requests but only one frame makes the request to the
> server which runs code to write to the Session store.  We do have
> KeepAlive's enabled so I don't think there should be any contention issues
> when attempting to write to the store.  Nevertheless this still seems like
> the only reason this might be happening.
> 
> Apache 1.3.22
> mod_perl 1.26
> Apache::Session 1.54

Could you give a little more detail please?  Lots of people have lots of
problems with Apache::Session, but it always comes down to not
destroying Session objects.

-jwb