Roundup Tracker - Issues

Message6738

Author rouilj
Recipients ber, jerrykan, rouilj, schlatterbeck
Date 2019-10-13.17:19:36
Message-id <1570987176.44.0.150234087313.issue2551025@roundup.psfhosted.org>
In-reply-to
Hmm, Using:

https://github.com/PyMySQL/mysqlclient-
python/compare/1.3.13...1.3.14#diff-
b86fdc88461d69279e84018bca8ea267L118-L119

it looks like  a new case was added that results in 
CR_SERVER_GONE_ERROR which is what error 2006 is IIUC.

I wonder if I was on the right path and we are leaking a double close 
of the database through.

Looking at the sql_close code, it looks like ProgrammingError used to 
be raised with a connection closed message.

So I am trying to emulate the same for OperationalError with:

         self.log_info('close')                                                 
         try:                                                                   
             self.conn.close()                                                  
+        # issue2551025: with revision 1.3.14 of mysqlclient.                   
+        # It looks like you can get an OperationalError 2006                   
+        # raised for closing a closed handle.                                  
+        except MySQLdb.OperationalError as message:                            
+            print str(message)                                                 
+            if str(message) != '':                                             
+                raise                                                          
         except MySQLdb.ProgrammingError as message:                            
             if str(message) != 'closing a closed connection':                  
                 raise                                                          

I hope this will allow me to figure out what message to filter
on and suppress the exception.

Comments??
History
Date User Action Args
2019-10-13 17:19:36rouiljsetmessageid: <1570987176.44.0.150234087313.issue2551025@roundup.psfhosted.org>
2019-10-13 17:19:36rouiljsetrecipients: + rouilj, schlatterbeck, ber, jerrykan
2019-10-13 17:19:36rouiljlinkissue2551025 messages
2019-10-13 17:19:36rouiljcreate