Closed
Bug 1408592
Opened 8 years ago
Closed 8 years ago
Avoid running out of RDS connections
Categories
(Socorro :: Symbols, task)
Socorro
Symbols
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: peterbe, Assigned: peterbe)
Details
Attachments
(1 file)
With RDS the amount of connections you can create is limited [0].
See https://sentry.prod.mozaws.net/operations/symbols-stage/issues/666658/
We can either with to persistent connections [1] or we can try to send a connection into each future when using a ThreadPoolExecutor pool.
[0] https://stackoverflow.com/a/38555806/205832
[1] https://devcenter.heroku.com/articles/python-concurrency-and-database-connections#persistent-connections and https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections
| Assignee | ||
Comment 1•8 years ago
|
||
I can't find any way to supply a custom connection or cursor to the ORM. Probably best to use persistent connections.
| Assignee | ||
Comment 2•8 years ago
|
||
Another option worth considering is to not do any saves inside the upload_file_upload() function. Instead it could be made to return FileUpload *instances* and then in the archive_upload() view call FileUpload.bulk_create(file_uploads).
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → peterbe
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla-services/tecken
https://github.com/mozilla-services/tecken/commit/1745f53f79eb634a6fc71ae6707a1562acad375d
fixes bug 1408592 - setting CONN_MAX_AGE for persistent connections (#477)
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•