-
Notifications
You must be signed in to change notification settings - Fork 94
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
psycopg connection error to DB #1523
Comments
I know this is a bit of an unusual bug report in so far that it does not use the standard docker compose setup, but any help is greatly appreciated. If you have any workaround that could recover from this or additional tests we could try, it would help us a lot. This is currently a major roadblock for using ScanCode.io with DejaCode in production. |
It seems that this issue is caused by how ScanCode.io's rqworker handle the database connection. I'm not familiar with Django-RQ or RQ itself, but it looks like either ScanCode.io does not use the rqworker correctly in this context or this is an underlying issue in Django-RQ, similar to: rq/django-rq#650 |
Setting the rqworker argument @tdruez Do you have any ideas regarding DB connection management, if there is something you can do on your side? I've seen |
Switching to |
Using
However, they seemingly never gotten around to synchronizing the results. I'm not sure if this is related to the SimpleWorker or an unrelated hiccup that happened. Starting another It would be beneficial if ScanCode would allow to configure whether we want threads or processes. Quite apparantely something goes wrong when using |
Describe the bug
In a deployment of ScanCode.io in Kubernetes the worker is consistently having issues with connection to the database server which it does not recover from (without restarting).
It appears that the TLS connection to the database is being forcefully closed with an RST by AWS RDS. Unfortunately, due to TLS and security features of Kubernetes, we were unable to intercept the plaintext traffic. It seems that the ScanCode worker send some message that is so out of the ordinary that the connection is being dropped.
System configuration
load_sbom
,scan_single_package
To Reproduce
Setup DejaCode with a ScanCode.io instance
load_sbom
pipeline is finished and the worker is supposed to work onsingle_package_scans
that it fails with connection issues to the DB (as seen in the stackt trace below).Expected behavior
Database connection should not be lost or at least get reestablished.
Screenshots
The text was updated successfully, but these errors were encountered: