You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am deploying the application in Azure App service.
I have an app service for the frontend, seems to work as intended.
And an app service for the backend but I have the error unable to open database file. See error below.
It seems that the database is not created, I have several print of "database not ready; waiting" but the error keeps occuring.
Have you heard of similar problem using Azure App service ?
I took a look at like #1313 but I am pulling the latest image version.
Do you have any hint for me to troubleshoot ?
Also, I see that, in my case, huey is used. Is it the expected behaviour ?
Thanks
2025-02-03T09:21:51.667148961Z Traceback (most recent call last):
2025-02-03T09:21:51.667970468Z File "/code/manage.py", line 23, in
2025-02-03T09:21:51.668774775Z main()
2025-02-03T09:21:51.669489281Z File "/code/manage.py", line 19, in main
2025-02-03T09:21:51.676506140Z execute_from_command_line(sys.argv)
2025-02-03T09:21:51.677287447Z File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
2025-02-03T09:21:51.678074153Z utility.execute()
2025-02-03T09:21:51.678088153Z File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 416, in execute
2025-02-03T09:21:51.678764559Z django.setup()
2025-02-03T09:21:51.678778259Z File "/code/.venv/lib/python3.12/site-packages/django/init.py", line 24, in setup
2025-02-03T09:21:51.679005561Z apps.populate(settings.INSTALLED_APPS)
2025-02-03T09:21:51.679015461Z File "/code/.venv/lib/python3.12/site-packages/django/apps/registry.py", line 91, in populate
2025-02-03T09:21:51.686488424Z app_config = AppConfig.create(entry)
2025-02-03T09:21:51.697162414Z ^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.697182114Z File "/code/.venv/lib/python3.12/site-packages/django/apps/config.py", line 193, in create
2025-02-03T09:21:51.697186614Z import_module(entry)
2025-02-03T09:21:51.697189614Z File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
2025-02-03T09:21:51.697211614Z return _bootstrap._gcd_import(name[level:], package, level)
2025-02-03T09:21:51.697222314Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.697225314Z File "", line 1387, in _gcd_import
2025-02-03T09:21:51.697228514Z File "", line 1360, in _find_and_load
2025-02-03T09:21:51.697231414Z File "", line 1331, in _find_and_load_unlocked
2025-02-03T09:21:51.698869328Z File "", line 935, in _load_unlocked
2025-02-03T09:21:51.698882828Z File "", line 999, in exec_module
2025-02-03T09:21:51.706821595Z File "", line 488, in _call_with_frames_removed
2025-02-03T09:21:51.706993896Z File "/code/.venv/lib/python3.12/site-packages/huey/contrib/djhuey/init.py", line 101, in
2025-02-03T09:21:51.707776603Z HUEY = backend_cls(name, **huey_config)
2025-02-03T09:21:51.717112381Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.717129082Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 119, in init
2025-02-03T09:21:51.717133382Z self.storage = self.create_storage()
2025-02-03T09:21:51.717136382Z ^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.717139282Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 144, in create_storage
2025-02-03T09:21:51.719258899Z return self.get_storage(**self.storage_kwargs)
2025-02-03T09:21:51.737205350Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737263651Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 156, in get_storage
2025-02-03T09:21:51.737268051Z return Storage(self.name, **kwargs)
2025-02-03T09:21:51.737271351Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737274351Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 713, in init
2025-02-03T09:21:51.737277451Z super(SqliteStorage, self).init(name)
2025-02-03T09:21:51.737280151Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 628, in init
2025-02-03T09:21:51.737283151Z self.initialize_schema()
2025-02-03T09:21:51.737285851Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 664, in initialize_schema
2025-02-03T09:21:51.737288651Z with self.db(commit=True, close=True) as curs:
2025-02-03T09:21:51.737291451Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737294251Z File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2025-02-03T09:21:51.737297751Z return next(self.gen)
2025-02-03T09:21:51.737300451Z ^^^^^^^^^^^^^^
2025-02-03T09:21:51.737314351Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 647, in db
2025-02-03T09:21:51.737317351Z conn = self.conn
2025-02-03T09:21:51.737319951Z ^^^^^^^^^
2025-02-03T09:21:51.737322551Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 639, in conn
2025-02-03T09:21:51.737325451Z self._state.set_connection(self._create_connection())
2025-02-03T09:21:51.737328351Z ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737331051Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 716, in _create_connection
2025-02-03T09:21:51.737333951Z conn = sqlite3.connect(self.filename, timeout=self._timeout,
2025-02-03T09:21:51.737336751Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737339451Z sqlite3.OperationalError: unable to open database file
2025-02-03T09:21:52.151613035Z database not ready; waiting
2025-02-03T09:22:03.400Z INFO - Stopping site ciso-assistant-backend because it failed during startup.
The text was updated successfully, but these errors were encountered:
Hello,
I am deploying the application in Azure App service.
I have an app service for the frontend, seems to work as intended.
And an app service for the backend but I have the error unable to open database file. See error below.
It seems that the database is not created, I have several print of "database not ready; waiting" but the error keeps occuring.
Have you heard of similar problem using Azure App service ?
I took a look at like #1313 but I am pulling the latest image version.
Do you have any hint for me to troubleshoot ?
Also, I see that, in my case, huey is used. Is it the expected behaviour ?
Thanks
2025-02-03T09:21:51.667148961Z Traceback (most recent call last):
2025-02-03T09:21:51.667970468Z File "/code/manage.py", line 23, in
2025-02-03T09:21:51.668774775Z main()
2025-02-03T09:21:51.669489281Z File "/code/manage.py", line 19, in main
2025-02-03T09:21:51.676506140Z execute_from_command_line(sys.argv)
2025-02-03T09:21:51.677287447Z File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
2025-02-03T09:21:51.678074153Z utility.execute()
2025-02-03T09:21:51.678088153Z File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 416, in execute
2025-02-03T09:21:51.678764559Z django.setup()
2025-02-03T09:21:51.678778259Z File "/code/.venv/lib/python3.12/site-packages/django/init.py", line 24, in setup
2025-02-03T09:21:51.679005561Z apps.populate(settings.INSTALLED_APPS)
2025-02-03T09:21:51.679015461Z File "/code/.venv/lib/python3.12/site-packages/django/apps/registry.py", line 91, in populate
2025-02-03T09:21:51.686488424Z app_config = AppConfig.create(entry)
2025-02-03T09:21:51.697162414Z ^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.697182114Z File "/code/.venv/lib/python3.12/site-packages/django/apps/config.py", line 193, in create
2025-02-03T09:21:51.697186614Z import_module(entry)
2025-02-03T09:21:51.697189614Z File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
2025-02-03T09:21:51.697211614Z return _bootstrap._gcd_import(name[level:], package, level)
2025-02-03T09:21:51.697222314Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.697225314Z File "", line 1387, in _gcd_import
2025-02-03T09:21:51.697228514Z File "", line 1360, in _find_and_load
2025-02-03T09:21:51.697231414Z File "", line 1331, in _find_and_load_unlocked
2025-02-03T09:21:51.698869328Z File "", line 935, in _load_unlocked
2025-02-03T09:21:51.698882828Z File "", line 999, in exec_module
2025-02-03T09:21:51.706821595Z File "", line 488, in _call_with_frames_removed
2025-02-03T09:21:51.706993896Z File "/code/.venv/lib/python3.12/site-packages/huey/contrib/djhuey/init.py", line 101, in
2025-02-03T09:21:51.707776603Z HUEY = backend_cls(name, **huey_config)
2025-02-03T09:21:51.717112381Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.717129082Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 119, in init
2025-02-03T09:21:51.717133382Z self.storage = self.create_storage()
2025-02-03T09:21:51.717136382Z ^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.717139282Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 144, in create_storage
2025-02-03T09:21:51.719258899Z return self.get_storage(**self.storage_kwargs)
2025-02-03T09:21:51.737205350Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737263651Z File "/code/.venv/lib/python3.12/site-packages/huey/api.py", line 156, in get_storage
2025-02-03T09:21:51.737268051Z return Storage(self.name, **kwargs)
2025-02-03T09:21:51.737271351Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737274351Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 713, in init
2025-02-03T09:21:51.737277451Z super(SqliteStorage, self).init(name)
2025-02-03T09:21:51.737280151Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 628, in init
2025-02-03T09:21:51.737283151Z self.initialize_schema()
2025-02-03T09:21:51.737285851Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 664, in initialize_schema
2025-02-03T09:21:51.737288651Z with self.db(commit=True, close=True) as curs:
2025-02-03T09:21:51.737291451Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737294251Z File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2025-02-03T09:21:51.737297751Z return next(self.gen)
2025-02-03T09:21:51.737300451Z ^^^^^^^^^^^^^^
2025-02-03T09:21:51.737314351Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 647, in db
2025-02-03T09:21:51.737317351Z conn = self.conn
2025-02-03T09:21:51.737319951Z ^^^^^^^^^
2025-02-03T09:21:51.737322551Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 639, in conn
2025-02-03T09:21:51.737325451Z self._state.set_connection(self._create_connection())
2025-02-03T09:21:51.737328351Z ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737331051Z File "/code/.venv/lib/python3.12/site-packages/huey/storage.py", line 716, in _create_connection
2025-02-03T09:21:51.737333951Z conn = sqlite3.connect(self.filename, timeout=self._timeout,
2025-02-03T09:21:51.737336751Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-03T09:21:51.737339451Z sqlite3.OperationalError: unable to open database file
2025-02-03T09:21:52.151613035Z database not ready; waiting
2025-02-03T09:22:03.400Z INFO - Stopping site ciso-assistant-backend because it failed during startup.
The text was updated successfully, but these errors were encountered: