[HELP] Frigate some sort of crash?

Hi guys,

Having some issues with Frigate add-on on my environment. It gets fixed every time I restart the add-on. So it basically stop producing the snapshots of events, and I can’t really access the Frigate web gui.

Getting these errors in the add-on log file:

File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2242, in preprocess_request
rv = func()
File “/opt/frigate/frigate/http.py”, line 89, in _db_connect
database.connect()
File “/usr/local/lib/python3.8/dist-packages/peewee.py”, line 3061, in connect
raise OperationalError(‘Connection already opened.’)
peewee.OperationalError: Connection already opened.
2021-07-05T01:29:18Z {‘REMOTE_ADDR’: ‘127.0.0.1’, ‘REMOTE_PORT’: ‘54674’, ‘HTTP_HOST’: ‘192.168.0.250’, (hidden keys: 30)} failed with OperationalError
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/flask_sockets.py”, line 40, in call
handler, values = adapter.match()
File “/usr/local/lib/python3.8/dist-packages/werkzeug/routing.py”, line 1945, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py”, line 999, in handle_one_response
self.run_application()
File “/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py”, line 87, in run_application
return super(WebSocketHandler, self).run_application()
File “/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py”, line 945, in run_application
self.result = self.application(self.environ, self.start_response)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2464, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.8/dist-packages/flask_sockets.py”, line 48, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2450, in wsgi_app
response = self.handle_exception(e)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.8/dist-packages/flask/_compat.py”, line 39, in reraise
raise value
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2447, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.8/dist-packages/flask/_compat.py”, line 39, in reraise
raise value
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1948, in full_dispatch_request
rv = self.preprocess_request()
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2242, in preprocess_request
rv = func()
File “/opt/frigate/frigate/http.py”, line 89, in _db_connect
database.connect()
File “/usr/local/lib/python3.8/dist-packages/peewee.py”, line 3061, in connect
raise OperationalError(‘Connection already opened.’)
peewee.OperationalError: Connection already opened.
2021-07-05T01:29:18Z {‘REMOTE_ADDR’: ‘127.0.0.1’, ‘REMOTE_PORT’: ‘54676’, ‘HTTP_HOST’: ‘192.168.0.250’, (hidden keys: 30)} failed with OperationalError
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/flask_sockets.py”, line 40, in call
handler, values = adapter.match()
File “/usr/local/lib/python3.8/dist-packages/werkzeug/routing.py”, line 1945, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py”, line 999, in handle_one_response
self.run_application()
File “/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py”, line 87, in run_application
return super(WebSocketHandler, self).run_application()
File “/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py”, line 945, in run_application
self.result = self.application(self.environ, self.start_response)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2464, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.8/dist-packages/flask_sockets.py”, line 48, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2450, in wsgi_app
response = self.handle_exception(e)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.8/dist-packages/flask/_compat.py”, line 39, in reraise
raise value
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2447, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.8/dist-packages/flask/_compat.py”, line 39, in reraise
raise value
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 1948, in full_dispatch_request
rv = self.preprocess_request()
File “/usr/local/lib/python3.8/dist-packages/flask/app.py”, line 2242, in preprocess_request
rv = func()
File “/opt/frigate/frigate/http.py”, line 89, in _db_connect
database.connect()
File “/usr/local/lib/python3.8/dist-packages/peewee.py”, line 3061, in connect
raise OperationalError(‘Connection already opened.’)
peewee.OperationalError: Connection already opened.
2021-07-05T01:29:18Z {‘REMOTE_ADDR’: ‘127.0.0.1’, ‘REMOTE_PORT’: ‘54678’, ‘HTTP_HOST’: ‘192.168.0.250’, (hidden keys: 30)} failed with OperationalError
Traceback (most recent call last):

Any ideas what causing this behavior?

Regards,
Didi

I too have many issues with Frigate crashing. It doesn’t matter if I run it on a dedicated Pi (using USB Coral) or have it integrated with home assistant. In both instances, at some point it becomes unresponsive and has to be hard rebooted. I did notice at the exact same time this happens (I get notified out the wahoo when HA becomes unresponsive) one of my cameras is also having problems. Its a cheap reolink so maybe its tied to something with that specific camera.