Menu

MySQL keeps closing connections (Linux)

Help
2002-08-01
2012-09-19
  • Costas Malamas

    Costas Malamas - 2002-08-01

    Hello,

    I keep getting these errors in my /var/log/mysqld which end up crashing my python app server (Webware):
    020731 16:15:51  Aborted connection 10445 to db: 'YYYY' user: 'UUUU' host: `localhost' (Got timeout reading communication packets)
    020731 16:15:51  Aborted connection 10444 to db: 'XXXX' user: 'UUUU' host: `localhost' (Got timeout reading communication packets)

    I am using Python 2.1.1, MySQL 3.23.36-1 (on RH 7.1) and I have tried both MySQL-python-0.9 and MySQL-python-0.9.2c3 and I am getting the same errors with both. 

    I am not sure if this is a MySQL-python error, but the problem here is that the app server is crashing completely, without a traceback or any other clue that could help me to debug this.  Any pointers?  ideas as to what may be going on?

    Thanks in advance,

    Costas

     
    • Andy Dustman

      Andy Dustman - 2002-08-01

      I don't really know much about Webware, but I assume it is a multi-threaded app.

      Beware that you two threads cannot use a connection at the same time. You could use some form of resource locking to prevent simultaneous use, but I don't recommend this either. Sharing connections is just not a good idea with a multi-threaded server like MySQL. Although it does appear you have multiple connections in this case.

      You might also make use of a connection pool. I have a separate module for this:

      http://dustman.net/andy/python/Pool

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.