Changes between Initial Version and Version 3 of Ticket #35812


Ignore:
Timestamp:
Oct 3, 2024, 10:28:11 PM (28 hours ago)
Author:
Adithya Kaade Arvind
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35812

    • Property Type UncategorizedBug
    • Property Cc Adithya Kaade Arvind added
    • Property Component UncategorizedDatabase layer (models, ORM)
  • Ticket #35812 – Description

    initial v3  
    55**Steps to Reproduce:**
    66
    7     Create a custom Django app using python manage.py startapp.
    8     Inside the app, implement an infinite loop to poll messages from a Kafka topic.
    9     Messages are rarely inserted into the Kafka topic.
    10     After a long idle period, when a new message is received and the app tries to query the MySQL database, the first query fails with the error (2006, 'Server has gone away').
    11     Immediately after this failure, subsequent queries succeed without any errors.
     7Create a custom Django app using python manage.py startapp.
     8Inside the app, implement an infinite loop to poll messages from a Kafka topic.
     9Messages are rarely inserted into the Kafka topic.
     10After a long idle period, when a new message is received and the app tries to query the MySQL database, the first query fails with the error (2006, 'Server has gone away').
     11Immediately after this failure, subsequent queries succeed without any errors.
    1212
    1313**Expected Behavior:**
     
    1616Actual Behavior:
    1717
    18     The first query fails with a 2006: 'MySQL server has gone away' error after an idle period.
    19     Setting CONN_HEALTH_CHECKS = True did not resolve the issue.
    20     Setting CONN_MAX_AGE = 30 also did not prevent the error.
    21     All subsequent queries after the first failure succeed immediately without issues.
     18The first query fails with a 2006: 'MySQL server has gone away' error after an idle period.
     19Setting CONN_HEALTH_CHECKS = True did not resolve the issue.
     20Setting CONN_MAX_AGE = 30 also did not prevent the error.
     21All subsequent queries after the first failure succeed immediately without issues.
    2222
    2323**Environment:**
    2424
    25     Django Version: 4.2.13
    26     Python Version: 3.10.14
    27     MySQL Version: 8.0
     25Django Version: 4.2.13
     26Python Version: 3.10.14
     27MySQL Version: 8.0
    2828
    2929**Additional Information:**
    3030
    31     The issue only occurs for the first query after an idle period; subsequent queries work as expected.
    32     Tested with both CONN_HEALTH_CHECKS and CONN_MAX_AGE settings, but the issue persists.
     31The issue only occurs for the first query after an idle period; subsequent queries work as expected.
     32Tested with both CONN_HEALTH_CHECKS and CONN_MAX_AGE settings, but the issue persists.
Back to Top