mariadb/mysql database (2006, 'MySQL server has gone away')

111 views
Skip to first unread message

BR

unread,
Nov 1, 2019, 1:13:41 PM11/1/19
to Django users
I think I'm experiencing an issue related to:


where I get (2006, 'MySQL server has gone away') after trying to establish a new channels connection with calls using database_sync_to_async(). I have set my Django DB CONN_MAX_AGE to 300 (5 minutes) and my MariaDB wait_timeout to 28800 (was 600 originally). All this did was extend the time before I saw the issue.

Why would Django not be clearing out old connections, and why doesn't it just open a new one?

BR

unread,
Nov 7, 2019, 2:11:24 PM11/7/19
to Django users
I'm still having this issue, and it definitely seems Channels related. When the issue occurs, I can logout/login and do other things on the Django only portion of the site. As soon as I try to make DB requests from within a Channels consumer, the error pops up. Restarting the Daphne server resolves the issue.
Reply all
Reply to author
Forward
0 new messages