CodeForPhilly / CodeForPhilly/paws-data-pipeline
Intermittent db error - "server closed the connection unexpectedly"
- Dominant language
- Python
- Stars
- 19
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
There is an intermittent error being thrown on the call to `api/get_last_runs`.
```
paws-compose-server | File "/app/./api/admin_api.py", line 241, in get_run_logs
paws-compose-server | result = connection.execute(q)
...
paws-compose-server | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) server closed the connection unexpected
paws-compose-server | This probably means the server terminated abnormally
paws-compose-server | before or while processing the request.
paws-compose-server |
paws-compose-server | [SQL: select keycol,valcol from kv_unique where keycol like '%%_update'; ]
paws-compose-server | (Background on this error at: http://sqlalche.me/e/14/e3q8)
```
- It seems to only happen when the container has been recently started
- Most likely due to something not having finished spinning up with the database, as I can't think of another reason a valid SQL query with no params or anything would fail like this.
- Manually testing a few times, the only way I could reproduce the error is to start the container and quickly go to the page where this endpoint is being hit, and the call has consistently succeeded when I've waited a minute or so after the container starts.
- A page refresh has fixed the issue in every instance I've encountered
@c-simpson Does the above sound plausible? If so, I don't think this is much of an issue, but I wanted to track it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.