I'm using file-based Beaker sessions. If something happens to the session
file, (for example, if I delete the directory on my development machine), I
get a 500 error:
File "[dir]/lib/python2.7/site-packages/beaker/session.py", line 659, in
__getattr__
return getattr(self._session(), attr)
File "[dir]/lib/python2.7/site-packages/beaker/session.py", line 655, in
_session
**params)
File "[dir]/lib/python2.7/site-packages/beaker/session.py", line 162, in
__init__
self.load()
File "[dir]/lib/python2.7/site-packages/beaker/session.py", line 329, in
load
self.namespace.acquire_read_lock()
File "[dir]/lib/python2.7/site-packages/beaker/container.py", line 211,
in acquire_read_lock
self.access_lock.acquire_read_lock()
File "[dir]/lib/python2.7/site-packages/beaker/synchronization.py", line
154, in acquire_read_lock
x = self.do_acquire_read_lock(wait)
File "[dir]/lib/python2.7/site-packages/beaker/synchronization.py", line
241, in do_acquire_read_lock
filedescriptor = self._open(os.O_CREAT | os.O_RDONLY)
File "[dir]/lib/python2.7/site-packages/beaker/synchronization.py", line
236, in _open
filedescriptor = os.open(self.filename, mode)
OSError: [Errno 2] No such file or directory:
'[dir]/data/sessions/lock/e/e9/e953f617010ebeee3990cce9eb345c584e5fcb96.lock'
This will be a problem in production: I'll have a standby webserver
waiting to take over in case of failure on the primary server. If the
standby were to take over, it won't have the session data and all users
with sessions will be getting 500 errors. How can I have it fail more
gracefully, and just create a new, empty session?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.