Project

General

Profile

Bug #802

handle nicely db unavailability

Added by Thomas Capricelli about 7 years ago.

Status:
New
Priority:
Normal
Category:
daemon
Target version:
-
Start date:
12/13/2013
Due date:
% Done:

0%

Estimated time:

Description

The server is crashed and needa be restarted by hand.
Typical usecase :

Traceback (most recent call last):
File "/usr/olocal/web-apps/colibri/daemon/colibrid.py", line 647, in main
colibrid.run()
File "/usr/olocal/web-apps/colibri/daemon/colibrid.py", line 250, in run
self.checkIncomingMails()
File "/usr/olocal/web-apps/colibri/daemon/colibrid.py", line 262, in checkIncomingMails
self.checkOneFile(filename)
File "/usr/olocal/web-apps/colibri/daemon/colibrid.py", line 320, in checkOneFile
deepdbg('Found %d lists for this criteria' % lists.count())
File "/usr/olocal/web-apps/django-1.6/django/db/models/query.py", line 291, in count
return self.query.get_count(using=self.db)
File "/usr/olocal/web-apps/django-1.6/django/db/models/sql/query.py", line 390, in get_count
number = obj.get_aggregation(using=using)[None]
File "/usr/olocal/web-apps/django-1.6/django/db/models/sql/query.py", line 356, in get_aggregation
result = query.get_compiler(using).execute_sql(SINGLE)
File "/usr/olocal/web-apps/django-1.6/django/db/models/sql/compiler.py", line 781, in execute_sql
cursor.execute(sql, params)
File "/usr/olocal/web-apps/django-1.6/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/olocal/web-apps/django-1.6/django/db/utils.py", line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/olocal/web-apps/django-1.6/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/olocal/web-apps/django-1.6/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (2006, 'MySQL server has gone away')

Also available in: Atom PDF