#31515: Django tries to reuse MySQL connections that have gone away with ASGI
-------------------------------------+-------------------------------------
Reporter: Braunson | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Braunson):
Replying to [comment:5 Simon Charette]:
> Thanks for trying it out. It also has bit of similarity with #30398 but
the fact it only happens with ASGI is puzzling. Could you try setting up a
minimal project that reproduces your issue to make it easier to identify
its origin?
Actually @Simon I'm not able to reproduce the specific "MySQL has gone
away" issue on Django, but I AM able to reproduce the fact that Django
seems to not be closing the database connections properly which could be
causing it. My development machine when running a benchmark on this test
code shows the following in the SQL server:
{{{
2020-04-26 1:10:37 154 [Warning] Aborted connection 154 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:12:28 168 [Warning] Aborted connection 168 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:13:13 171 [Warning] Aborted connection 171 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:17:32 178 [Warning] Aborted connection 178 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 280 [Warning] Aborted connection 280 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 282 [Warning] Aborted connection 282 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 187 [Warning] Aborted connection 187 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 180 [Warning] Aborted connection 180 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 186 [Warning] Aborted connection 186 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 281 [Warning] Aborted connection 281 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 279 [Warning] Aborted connection 279 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
2020-04-26 1:21:33 182 [Warning] Aborted connection 182 to db: 'test'
user: 'root' host: '172.17.0.1' (Got an error reading communication
packets)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31515#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.0900544ef492966865d33e3cf2cf2820%40djangoproject.com.