[sqlalchemy] Re: SQLAlchemy delay reconnecting

2015-04-04 Thread Jonathan Vanasco
I've had issues like this in the past, and in the worst situations your services can end up giving your system a ddos. what i usually do to avoid this, is implement a delay on the connection pool itself, and have each service cycle through a set of delays with a different starting point in

[sqlalchemy] Re: SQLAlchemy delay reconnecting

2015-04-04 Thread Henrique Fleury
this error happened. Traceback (most recent call last): File server.py, line 112, in module location = Location(galileo, gateway, processing) File C:\Desenvolvimento\locations\Location.py, line 41, in __init__ 'device' : Table('device', galileo, autoload=True,

[sqlalchemy] Re: SQLAlchemy delay reconnecting

2015-04-04 Thread Henrique Fleury
I researched and found another way to do which was: from retrying import retry @retry(stop_max_delay=1) def get_con_gateway(self): con = self.gateway['engine'].connect() return con I used retrying module and made a method to create the connections. Em sábado, 4 de abril