Jonathan LaCour wrote: > > My application uses MySQL with InnoDB tables and replication. We're > starting to encounter an issue on a few particular parts of the > application where we're getting tracebacks like this: > > <class 'sqlalchemy.exc.OperationalError'>: (OperationalError) > (1213, 'Deadlock found when trying to get lock; try restarting > transaction') > > According to MySQL documentation, there are a large variety of > circumstances in which this could happen, mostly innocuous in > nature. The official recommended solution to the problem is: "retry > the transaction". > > Does SQLAlchemy offer some method for me to catch this exception and > then retry the transaction?
there's nothing offered beyond the usual notion of catching an exception and running the function again. It also depends very much upon the construction of your application, whether you're looking to do this in an ORM context, etc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
