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

Database connections are not re-established if they are lost of some reason #86

Open
Zharktas opened this issue Apr 20, 2023 · 2 comments
Assignees
Labels
1.x will be done in DP+ 1.x - DP+ running as CKAN extension bug Something isn't working

Comments

@Zharktas
Copy link
Contributor

Describe the bug
If databases connections are lost for some reason, like restarting database server, the connections are lost and datapusher+ produces an error. The logs show the following:

sqlalchemy.exc.OperationalError: (psycopg2.errors.AdminShutdown) terminating connection due to administrator command
SSL connection has been closed unexpectedly
[SQL: INSERT INTO apscheduler_jobs (id, next_run_time, job_state) VALUES (%(id)s, %(next_run_time)s, %(job_state)s)

To Reproduce
Steps to reproduce the behavior:

  1. Restart your database
  2. Try to add CSV to datastore via datapusher+.

Expected behavior
The data would be added to the datastore

@jqnatividad jqnatividad added the bug Something isn't working label Apr 26, 2023
@jqnatividad
Copy link
Contributor

Thanks for the report @Zharktas .

Now that DP+ uses PostgreSQL instead of sqlite for the job history, will need to make the DB connection more robust.

@jqnatividad jqnatividad self-assigned this May 5, 2023
@jqnatividad
Copy link
Contributor

jqnatividad commented Jun 16, 2023

This will be fixed when we release DP+ 1.x, where we convert DP+ to a CKAN extension, so we won't need to use apscheduler anymore.

cc @tino097 @TomeCirun

@jqnatividad jqnatividad added the 1.x will be done in DP+ 1.x - DP+ running as CKAN extension label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x will be done in DP+ 1.x - DP+ running as CKAN extension bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants