I am using SQLAlchemy with two MySQL databases. One is my development database, hosted locally on my machine, and the other is the MySQL server provided by ClearDB on Heroku for production.
I have a long database session when it performs a synchronization operation with another service. On my local machine, this ends up fine, but in production I get an error (2013, "Lost connection to MySQL server during query").
I read other posts that say it can be either the request size is too large or the pool update variable that needs to be configured. I donโt think the transaction payload is relatively large and setting the pool_recycle
variable when calling SQLAlachemy create_engine
did not seem to work.
Has anyone else encountered this problem or were able to help me narrow down the cause of this error - it seems like a trick and I'm not sure where to go from here.
As indicated in the comments, both systems return the same values โโfor select @@interactive_timeout, @@wait_timeout
: 28800, 28800.
thanks
source share