Hi!
On Thu, Oct 31, 2013 at 10:40:07AM +0100, "sophana78 ." <sop...@gm...> wrote:
> Every few weeks, my web server, which uses sqlobjects, gets stuck with this
> error:
> <class 'sqlobject.dberrors.ProgrammingError'>: Commands out of sync; you
> can't run this command now
>
> It sometime recovers after a few hundred transactions, sometime, it doesn't
> and remains stuck in this state.
>
> It seems that all connections in the pool are "bad".
>
> Do you know a way of reseting these connections? conn.commit()?
> conn.ping()? kill the connection (how)?
>
> After looking at the code, I'm thinking about the following patch:
> in dbconnection.py, in _runWithConnection, I would like to catch this
> error. If it happens, I would reset the connection, then retry.
>
> Or should I do this in mysqlconnection.py, in _executeRetry?
Yes, I think mysqlconnection.py is a better place to handle
MySQL-specific problems.
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|