Do you use mysql 5?
I had this problem corrected once with a patch in mysqldb and in
sqlobject0.8.
But When I upgraded to mysqldb 1.2.2, it didn't work anymore. I also
reverted to latest sqlobject 0.7.x
My application make regular checks. So the mysql done away problem
doesn't appear.
The mysqldb patch was setting a reconnect option at the mysql C api level.

Aaron Bostick a écrit :
> Do SO connections time out after periods of inactivity?  Would this be
> database driver specific if so?  Is there a way to check the freshness
> of a SO connection and reconnect instead of throwing a nasty traceback.
>
> I get a traceback like this in my app after periods of inactivity and
> think it may be timeout/staleness related:
>
> 500 Internal error
>
> The server encountered an unexpected condition which prevented it from
> fulfilling the request.
>
> Page handler: <bound method Root.login of <myportal.controllers.Root
> object at 0xb737412c>>
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
> line 105, in _run
>     self.main()
>   File
> "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
> line 254, in main
>     body = page_handler(*virtual_path, **self.params)
>   File "<string>", line 3, in login
>   File
> "/usr/lib/python2.4/site-packages/TurboGears-1.1a0-py2.4.egg/turbogears/controllers.py",
> line 275, in expose
>     output = database.run_with_transaction(
>   File "<string>", line 5, in run_with_transaction
>   File
> "/usr/lib/python2.4/site-packages/TurboGears-1.1a0-py2.4.egg/turbogears/database.py",
> line 262, in so_rwt
>     end_all()
>   File
> "/usr/lib/python2.4/site-packages/TurboGears-1.1a0-py2.4.egg/turbogears/database.py",
> line 233, in end_all
>     hub.end()
>   File
> "/usr/lib/python2.4/site-packages/TurboGears-1.1a0-py2.4.egg/turbogears/database.py",
> line 148, in end
>     conn.rollback()
>   File
> "/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/dbconnection.py",
> line 808, in rollback
>     self._connection.rollback()
>   File "/usr/lib/python2.4/site-packages/Sybase.py", line 979, in rollback
>     self.execute('rollback transaction')
>   File "/usr/lib/python2.4/site-packages/Sybase.py", line 996, in execute
>     fetcher.start(self.arraysize)
>   File "/usr/lib/python2.4/site-packages/Sybase.py", line 307, in start
>     status = self._cmd.ct_send()
>   File "/usr/lib/python2.4/site-packages/Sybase.py", line 184, in
> _clientmsg_cb
>     raise DatabaseError(_fmt_client(msg))
> DatabaseError: Layer: 0, Origin: 0
> Attempt to initiate a new SQL Server operation with results pending.
>
> Powered by CherryPy 2.2.1
>
> This is a turbogears traceback running on SO with the syabse adapter.
>
> Thanks for any help in this regard!!!
> Aaron
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> sqlobject-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to