Strange session and pickle error

218 views
Skip to first unread message

SeC

unread,
Sep 8, 2009, 5:41:41 PM9/8/09
to web.py
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/web.py-0.32-py2.6.egg/
web/application.py", line 240, in process
return p(lambda: process(processors))
File "/usr/local/lib/python2.6/site-packages/web.py-0.32-py2.6.egg/
web/session.py", line 56, in _processor
self._load()
File "/usr/local/lib/python2.6/site-packages/web.py-0.32-py2.6.egg/
web/session.py", line 75, in _load
d = self.store[self.session_id]
File "/usr/local/lib/python2.6/site-packages/web.py-0.32-py2.6.egg/
web/session.py", line 211, in __getitem__
return self.decode(pickled)
File "/usr/local/lib/python2.6/site-packages/web.py-0.32-py2.6.egg/
web/session.py", line 173, in decode
return pickle.loads(pickled)
EOFError

I'm getting this random. On my dev machine (Windows) code works ok,
but when I uploaded it to other box (FreeBSD) I sometimes get this
strange error

SeC

unread,
Sep 8, 2009, 5:46:49 PM9/8/09
to web.py
Also console log looks strange:
192.168.128.10:52493 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
5" - 500 Internal Server Error192.168.128.10:52494 - - [08/Sep/2009
23:41:34] "HTTP/1.1 GET /photo/11" - 200 OK
0.14 (1): SELECT * FROM news WHERE id = u'6'

192.168.128.10:52491 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
9" - 200 OK
192.168.128.10:52490 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
7" - 200 OK
192.168.128.10:52489 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
10" - 200 OK



192.168.128.10:52495 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
6" - 200 OK
192.168.128.10:52490 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
2" - 500 Internal Server Error
192.168.128.10:52494 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
4" - 500 Internal Server Error192.168.128.10:52493 - - [08/Sep/2009
23:41:34] "HTTP/1.1 GET /photo/3" - 500 Internal Server Error0.04 (1):
SELECT * FROM news WHERE id = u'1'


192.168.128.10:52491 - - [08/Sep/2009 23:41:34] "HTTP/1.1 GET /photo/
1" - 200 OK


This is built in debug server used. Database is MySQL + MySQLdb +
DBUtils installed. Database is accessed remotly.

Zhang Huangbin

unread,
Sep 9, 2009, 12:26:23 AM9/9/09
to web.py
I have same/similar issue while i copy a new version of project into
directory which already running the webpy app. :(

-----------
192.168.6.1:50810 - - [28/Jun/2009 07:04:25] "HTTP/1.1 GET /dashboard"
- 200 OK
192.168.6.1:50810 - - [28/Jun/2009 07:04:25] "HTTP/1.1 GET /static/
default/css/iredadmin_cs.css" - 200
192.168.6.1:50811 - - [28/Jun/2009 07:04:25] "HTTP/1.1 GET /static/
default/css/iredadmin.css" - 200
0.0 (1): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (2): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (3): UPDATE sessions SET atime = '2009-06-28T07:04:30.300641'
WHERE session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
application.py", line 242, in process
return self.handle()
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
application.py", line 233, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
application.py", line 412, in _delegate
return handle_class(cls)
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
application.py", line 387, in handle_class
return tocall(*args)
File "/var/www/iredadmin/controllers/ldap/base.py", line 25, in
proxyfunc
session.kill()
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
session.py", line 146, in kill
del self.store[self.session_id]
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
utils.py", line 923, in __getattr__
return getattr(self._getd(), key)
File "/usr/lib/python2.4/site-packages/web.py-0.32-py2.4.egg/web/
utils.py", line 68, in __getattr__
raise AttributeError, k
AttributeError: 'session_id'

0.0 (4): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (5): UPDATE sessions SET data =
'KGRwMQpTJ3VzZXJuYW1lJwpwMgpTJ3Bvc3RtYXN0ZXJAYS5jbicKcDMKc1MnbGFuZycKcDQKUyd6\naF9DTicKcDUKc1MnZG9tYWluR2xvYmFsQWRtaW4nCnA2ClMneWVzJwpwNwpzUydpcCcKcDgKVjE5\nMi4xNjguNi4xCnA5CnNTJ2xvZ2dlZCcKcDEwCkkwMQpzUydzZXNzaW9uX2lkJwpwMTEKUydhNGRh
\nZGRiMzIzODQ0YzQ0NTA0N2JkNDU3ZWYwZjFiOTFlOTU2ZWUyJwpwMTIKc1MnZmFpbGVkVGltZXMn
\nCnAxMwpJMApzUyd3ZWJtYXN0ZXInCnAxNApTJ21pY2hhZWxiaWJieUBnbWFpbC5jb20nCnAxNQpz
\nLg==\n' WHERE session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
192.168.6.1:50810 - - [28/Jun/2009 07:04:30] "HTTP/1.1 GET /dashboard"
- 500 Internal Server Error
0.0 (1): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (2): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (3): UPDATE sessions SET atime = '2009-06-28T07:04:30.488362'
WHERE session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (4): SELECT * FROM sessions WHERE
session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
0.0 (5): UPDATE sessions SET data =
'KGRwMQpTJ3VzZXJuYW1lJwpwMgpTJ3Bvc3RtYXN0ZXJAYS5jbicKcDMKc1MnbGFuZycKcDQKUyd6\naF9DTicKcDUKc1MnZG9tYWluR2xvYmFsQWRtaW4nCnA2ClMneWVzJwpwNwpzUydpcCcKcDgKVjE5\nMi4xNjguNi4xCnA5CnNTJ2xvZ2dlZCcKcDEwCkkwMQpzUydzZXNzaW9uX2lkJwpwMTEKUydhNGRh
\nZGRiMzIzODQ0YzQ0NTA0N2JkNDU3ZWYwZjFiOTFlOTU2ZWUyJwpwMTIKc1MnZmFpbGVkVGltZXMn
\nCnAxMwpJMApzUyd3ZWJtYXN0ZXInCnAxNApTJ21pY2hhZWxiaWJieUBnbWFpbC5jb20nCnAxNQpz
\nLg==\n' WHERE session_id='a4daddb323844c445047bd457ef0f1b91e956ee2'
192.168.6.1:50810 - - [28/Jun/2009 07:04:30] "HTTP/1.1 GET /
favicon.ico" - 404 Not Found
-------------

Zhang Huangbin

unread,
Sep 9, 2009, 12:31:48 AM9/9/09
to web.py


On Sep 9, 12:26 pm, Zhang Huangbin <michaelbi...@gmail.com> wrote:
> I have same/similar issue while i copy a new version of project into
> directory which already running the webpy app. :(

I think it's necessary to explain more clear:

- Runing a webpy (0.32) app.
- Copy the same app code into the directory which used to running
above app, all files are the same, nothing changed.
- Session error raised as previous post.

SeC

unread,
Sep 9, 2009, 4:37:40 AM9/9/09
to web.py
For me it looks like some concurrency errors (console log order is
messed up) but that's impossible, as there is only one thread
running.. I think.

SeC

unread,
Sep 14, 2009, 9:06:53 AM9/14/09
to web.py
Switching from file session to database solves the problem (it looks
that way), but the problem is still there.

jeffkyjin

unread,
Sep 15, 2009, 2:19:47 AM9/15/09
to web.py
Also, for me it looks like some concurrency errors. when many
concurrency connect to a page request.

SeC

unread,
Sep 15, 2009, 4:50:27 AM9/15/09
to web.py
Yes, I also noticed that, but I thought that when running on 1 thread
this shouldn't happen, so it's web.py bug then?

jeffkyjin

unread,
Sep 22, 2009, 5:36:20 AM9/22/09
to web.py
I found 5 threads started when using lighttpd. have this strange
problem

and using the web.py 's self http server, it also have this strange
problem.

Ben Hayden

unread,
Oct 7, 2011, 4:41:05 PM10/7/11
to we...@googlegroups.com
If anyone is still googling around about this error with Web.py - it still exists. My company got around it using DBStore instead of DiskStore for session data.
Reply all
Reply to author
Forward
0 new messages