The gunicorn log says Failed to find attribute 'application' in 'appName'. However this is django app name and not project name.
The error log reports - Reason: App failed to load.
And above it the somewhere we have - ModuleNotFoundError: No module named 'stru'
But there is neither an app nor a django project by that name. The project name is struttss.
Similar case seen for another django project. Gunicorn is somehow trimming the name of the project and not able to find the asgi/wsgi application.
Also some django project running fine previously and currently stops running after restarting.
Error Log file snippet for reference:
[2024-09-21 06:56:45 +0000] [87609] [ERROR] Reason: App failed to load.
[2024-09-21 07:04:05 +0000] [89146] [INFO] Starting gunicorn 23.0.0
[2024-09-21 07:04:05 +0000] [89146] [INFO] Listening at: http://0.0.0.0:8906 (89146)
[2024-09-21 07:04:05 +0000] [89146] [INFO] Using worker: gthread
[2024-09-21 07:04:05 +0000] [89147] [INFO] Booting worker with pid: 89147
[2024-09-21 07:04:05 +0000] [89147] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
worker.init_process()
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 94, in init_process
super().init_process()
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/workers/base.py", line 135, in init_process
self.load_wsgi()
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi
self.wsgi = self.app.wsgi()
^^^^^^^^^^^^^^^
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/app/base.py", line 66, in wsgi
self.callable = self.load()
^^^^^^^^^^^
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
return self.load_wsgiapp()
^^^^^^^^^^^^^^^^^^^
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
return util.import_app(self.app_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/site-packages/gunicorn/util.py", line 370, in import_app
mod = importlib.import_module(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/www/server/python_manager/versions/3.12.0/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1318, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'stru'
[2024-09-21 07:04:05 +0000] [89147] [INFO] Worker exiting (pid: 89147)