Issue - sync-configs timed out

This error occurs when I made some changes to the config file in http://pioreactor1.local/config and then press “save”

I was adding some charts, and sometimes it seems like the changes go through, but I’m not sure if they are going through every time. Despite these errors, I am able to add new charts and .yamls and see them displayed on the main page.

tail -n 50 /var/log/pioreactorui.log

2023-03-05T12:59:52-0800 [huey.consumer.Worker] ERROR Unhandled error during execution of task ca528aff-991a-44ad-ae3f-cb805828c890.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/huey/consumer.py", line 117, in loop
    self.huey.execute(task, now)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 362, in execute
    return self._execute(task, timestamp)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 407, in _execute
    self.put_result(task.id, task_value)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 323, in put_result
    return self.storage.put_data(key, self.serializer.serialize(data),
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 793, in put_data
    self.sql('insert or replace into kv (queue, key, value) '
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 670, in sql
    curs.execute(query, params or ())
sqlite3.DatabaseError: database disk image is malformed
2023-03-05T13:00:50-0800 [pioreactorui] ERROR sync-configs timed out.
2023-03-05T13:05:10-0800 [huey.consumer.Worker] ERROR Unhandled error during execution of task 29ea07d3-d1f0-4855-9c95-03b30a5d66d9.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/huey/consumer.py", line 117, in loop
    self.huey.execute(task, now)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 362, in execute
    return self._execute(task, timestamp)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 407, in _execute
    self.put_result(task.id, task_value)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 323, in put_result
    return self.storage.put_data(key, self.serializer.serialize(data),
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 793, in put_data
    self.sql('insert or replace into kv (queue, key, value) '
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 670, in sql
    curs.execute(query, params or ())
sqlite3.DatabaseError: database disk image is malformed
2023-03-05T13:06:08-0800 [pioreactorui] ERROR sync-configs timed out.
2023-03-05T13:18:36-0800 [huey.consumer.Worker] ERROR Unhandled error during execution of task 119e9f45-1f5f-4dd9-ad22-4735e22a2d21.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/huey/consumer.py", line 117, in loop
    self.huey.execute(task, now)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 362, in execute
    return self._execute(task, timestamp)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 407, in _execute
    self.put_result(task.id, task_value)
  File "/usr/local/lib/python3.9/dist-packages/huey/api.py", line 323, in put_result
    return self.storage.put_data(key, self.serializer.serialize(data),
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 793, in put_data
    self.sql('insert or replace into kv (queue, key, value) '
  File "/usr/local/lib/python3.9/dist-packages/huey/storage.py", line 670, in sql
    curs.execute(query, params or ())
sqlite3.DatabaseError: database disk image is malformed
2023-03-05T13:19:34-0800 [pioreactorui] ERROR sync-configs timed out.

sqlite3.DatabaseError: database disk image is malformed

Oof that looks scary! But rest assured, this is not the main database having problems, simply a temporary one we use to store tasks (like sync-configs). I haven’t seen this error before, I’ll make an issue for this to investigate this.

I think a restart would fix this, but I’m not sure.