#34082 closed Bug (invalid)
"mysql server has gone away" on 404, 403 or 401
Reported by: | williamchevremont | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I'm facing an issue I don't find any solution on the web, nor similar problem.
When my application raise some 404, 403 or 401 error, sometime, this lead to a "mysql server has gone away" error, randomly. There is no error on the mysql logs. The application run in a docker container, mysql server on one other. Even the "mysql_server_has_gone_away" connection engine didn't patch correctly the stuff. I can't upgrade to newer django version, because of some third party libraries that are not yet compatible.
Attachments (1)
Change History (4)
by , 2 years ago
Attachment: | mysql_gone_away.log added |
---|
comment:1 by , 2 years ago
Version: | 4.1 → 3.2 |
---|
comment:2 by , 2 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 2 years ago
Hi! I'm not sure if this is still relevant for you, but my application got this problem as well. The normal application running fine (with nginx and gunicorn/uvicorn), but whenever I hit a non-existing page a 500 error was thrown. I tried to restart the mysql service, but then I got even worse problems. So I enabled heavy logging in mysql and then I found out I missed quotes around 'init_command': 'SET sql_mode=STRICT_TRANS_TABLES'
so it wasn't a string, but an invalid identifier. Fixing that problem solved everything magically, and now the 404 pages properly throw a 404. Maybe this helps?
This ticket tracker isn't the place to get help. See TicketClosingReasons/UseSupportChannels.