Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres Output (SQL Mixin): not re-connecting on connection issues #2200

Closed
wagner-intevation opened this issue Jul 1, 2022 · 0 comments · Fixed by #2201
Closed

Postgres Output (SQL Mixin): not re-connecting on connection issues #2200

wagner-intevation opened this issue Jul 1, 2022 · 0 comments · Fixed by #2201
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: bots

Comments

@wagner-intevation
Copy link
Contributor

If the server restarts while the bot is running, it does not properly reconnect by itself after

psycopg2.InterfaceError: cursor already closed

though it correctly logs

postgresql-output - ERROR - Cursor has been closed, connecting again.

Working on a fix right now

wagner-intevation added a commit to wagner-intevation/intelmq that referenced this issue Jul 1, 2022
separate the sql mixin initialization from the __init__ to be able to
call it from inside the bot for re-connecting.
calling self.__init__ would require at least the bot-id
calling self._connect would require preparing all the arguments

fixes certtools#2200
@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: bots labels Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants