On Sun, 07 Sep 2008 10:11:43 +0200, Thorsten Leemhuis wrote:
The mysql drops if no build are queued for a few (6 ?) hours:
> Exception in thread BuildMaster:
> Traceback (most recent call last):
> File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
> self.run()
> File "/usr/share/plague/server/BuildMaster.py", line 412, in run
> self._start_new_jobs()
> File "/usr/share/plague/server/BuildMaster.py", line 299, in
_start_new_jobs
> self._cursor.execute("INSERT INTO jobs (%s username, package," \
> File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163, in
execute
> self.errorhandler(self, exc, value)
> File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 35,
in defaulterrorhandler
> raise errorclass, errorvalue
> OperationalError: (2006, 'MySQL server has gone away')
It's a mysql feature. It's mysqld running into an idle timeout,
closing the connection, and not reconnecting automatically by default.
Database access in Plague is not fully encapsulated, so without
further development this mysql exception can occur in many places.
You could increase the timeout values in the mysql config (poor
and unsafe work-around), patch mysql-python to support automatic
reconnect, or use postgresql/sqlite instead.
Alternatively, run a "plague-client list" as a cron job with an
unprivileged plague user.