My weewx application TFRC crashed during the backup of the database, see 
logging below.

Weewx version: 4.1.1
Python version: 3.7.3.
on Raspberry PI 3B+

Database: MariaDB 10.3.21-0063 on Synology NAS in the same local network

Usually a weewx program continues after the short period a database is not 
available (duration typically 90 seconds or less), but this time a database 
deadlock occurred.

Note: I did not set "loop_on_init = True" in weewx_tfrc.conf, but I wonder 
if weewx was restarted in this case if I did include the loop_on_init 
command.

Luc


Jun 16 03:10:20 pi31 tfrc[490] INFO user.tfrc: shutdown process 
/home/weewx/tfrec/tfrec -D -T 1
Jun 16 03:10:20 pi31 tfrc[490] INFO user.tfrc: tfrec with pid 6712 killed
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__: Caught unrecoverable 
exception:
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  (1213, 
'Deadlock found when trying to get lock; try restarting transaction')
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  Traceback (most 
recent call last):
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 195, in run
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self.dispatchEvent(weewx.Event(weewx.CHECK_LOOP, packet=packet))
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
callback(event)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 578, in check_loop
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      raise 
BreakLoop
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
weewx.engine.BreakLoop
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  During handling 
of the above exception, another exception occurred:
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  Traceback (most 
recent call last):
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 594, in post_loop
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self._catchup(self.engine.console.genArchiveRecords)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 638, in _catchup
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      for record 
in generator(lastgood_ts):
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/drivers/__init__.py", line 30, in genArchiveRecords
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      raise 
NotImplementedError("Method 'genArchiveRecords' not implemented")
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
NotImplementedError: Method 'genArchiveRecords' not implemented
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  During handling 
of the above exception, another exception occurred:
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  Traceback (most 
recent call last):
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weedb/mysql.py", line 52, in guarded_fn
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      return 
fn(*args, **kwargs)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weedb/mysql.py", line 262, in execute
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self.cursor.execute(mysql_string, tuple(sql_tuple))
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 250, in execute
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self.errorhandler(self, exc, value)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 50, in 
defaulterrorhandler
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      raise 
errorvalue
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 247, in execute
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      res = 
self._query(query)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 411, in _query
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      rowcount = 
self._do_query(q)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 374, in _do_query
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      db.query(q)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 292, in query
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
_mysql.connection.query(self, query)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
_mysql_exceptions.OperationalError: (1213, 'Deadlock found when trying to 
get lock; try restarting transaction')
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  During handling 
of the above exception, another exception occurred:
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  Traceback (most 
recent call last):
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewxd", line 154, in main
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      engine.run()
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 202, in run
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
callback(event)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 596, in post_loop
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self._software_catchup()
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 658, in _software_catchup
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
origin='software'))
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
callback(event)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/engine.py", line 619, in new_archive_record
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/manager.py", line 268, in addRecord
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self._updateHiLo(accumulator, cursor)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/manager.py", line 913, in _updateHiLo
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self._set_day_summary(_stats_dict, accumulator.timespan.stop, cursor)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/manager.py", line 1152, in _set_day_summary
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      
self._write_metadata('lastUpdate', str(int(lastUpdate)), cursor)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weewx/manager.py", line 1183, in _write_metadata
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      (key, 
value))
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****    File 
"/home/weewx/bin/weedb/mysql.py", line 61, in guarded_fn
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****      raise 
klass(e)
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  
weedb.DatabaseError: (1213, 'Deadlock found when trying to get lock; try 
restarting transaction')
Jun 16 03:10:20 pi31 tfrc[490] CRITICAL __main__:     ****  Exiting.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f91fa55b-1665-4322-9d74-b8392df2415do%40googlegroups.com.

Reply via email to