You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On startup, infinite attempts are made to connect to postgres. When an attempt fails there is no error message.
As I understand it, there exists an attempt at a retry mechanism which limits the number of postgres connection attempts to 3. Afterwards, the exception is supposed to be raised. Unfortunately, this does not work as currently implemented and the exception is never raised.
There is also a todo associated with adding a proper error message. All of this can be found in postgres_async_db.py in the _init() method.
Proposed fix:
retries = 3
attempt = 0
while True:
try:
self.pool = await aiopg.create_pool(dsn)
for table in self.tables:
await table._init()
except Exception as e:
attempt += 1
print("Could not connect to database, attempt", attempt, "out of", retries, "\n Cause:", e)
if attempt == retries:
raise e
time.sleep(1)
continue
break
The text was updated successfully, but these errors were encountered:
On startup, infinite attempts are made to connect to postgres. When an attempt fails there is no error message.
As I understand it, there exists an attempt at a retry mechanism which limits the number of postgres connection attempts to 3. Afterwards, the exception is supposed to be raised. Unfortunately, this does not work as currently implemented and the exception is never raised.
There is also a todo associated with adding a proper error message. All of this can be found in postgres_async_db.py in the _init() method.
Proposed fix:
The text was updated successfully, but these errors were encountered: