Closed cieszdan closed 2 months ago
Why are you using the MySQL reconnect mixin with Postgres?
This will work for postgres as well if you changed reconnect_errors object
That is correct, but since you're already subclassing and extending the ReconnectMixin
you will also need to override the signature now for the execute_sql()
.
The docstring indicates that this should really not be used with Postgres, and that remains the case.
My follow up to this would then be what is the appropriate thing to use in order to reconnect when the connection to the PSQL database drops out? We've used the MySQL reconnect mixin for years without an issue and it's been extremely useful, otherwise our process needs to reboot in order to reestablish its connection, which may take a considerable amount of time. With the release of 3.17.6, it would seem we're left without a working solution, unless I'm missing something entirely. For the time being, we've rolled back to 3.17.5 until we can find a solution to this issue.
Thank you and regards.
No need to roll back necessarily, you'll just want to ensure that your ReconnectMixin
supports that special PostgresqlExtDatabase
parameter for named cursor support and override the appropriate error list.
You can try using something like pgbouncer to manage the health of your postgres connections, but even then you may still see an occasional connection issue if you (e.g.) restart pgbouncer.
Hi, after upgrade I have error during executing requests to DB. Below Traceback
Missing params in shortcuts.py in playhouse