Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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)

mysql_gone_away.log (31.5 KB ) - added by williamchevremont 2 years ago.

Download all attachments as: .zip

Change History (4)

by williamchevremont, 2 years ago

Attachment: mysql_gone_away.log added

comment:1 by williamchevremont, 2 years ago

Version: 4.13.2

comment:2 by Tim Graham, 2 years ago

Resolution: invalid
Status: newclosed

This ticket tracker isn't the place to get help. See TicketClosingReasons/UseSupportChannels.

comment:3 by Peter Tillema, 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?

Version 0, edited 2 years ago by Peter Tillema (next)
Note: See TracTickets for help on using tickets.
Back to Top