I have a python script that installs several working ones. They call for some methods in the SQLAlchemy models that I have that are also used by the Pylons application.
Everything works fine for an hour or two, then the MySQL thread is lost and all queries fail. I cannot understand why the stream is lost (I get the same results on three different servers) when I define such a low value for pool_recycle. Also, why not create a new connection?
Any ideas of things to research?
import gearman import json import ConfigParser import sys from sqlalchemy import create_engine class JSONDataEncoder(gearman.DataEncoder): @classmethod def encode(cls, encodable_object): return json.dumps(encodable_object) @classmethod def decode(cls, decodable_string): return json.loads(decodable_string)
source share