Open biyani701 opened 1 year ago
I have exactly same issue while using gunicorn
I have exactly same issue while using gunicorn
my bad had an initialization of container within if __name__ == '__main__':
block
I did the exact same mistake. Your hint helped me resolve my problem as well :-) I think there should be a better way to debug wiring issue as this looks like a black box.
i have used dependency_injector and injecting DynamicContainer. It is working fine on local machine or if i run it with python3 wsgi.py on ubuntu machine.
But when running it with nginx on ubuntu using uwsgi the dynamic injection does not work. Below is my
index.ini [uwsgi] module = wsgi master = true processes = 4 socket = index.sock chmod-socket = 777 vacuum = true die-on-term = true chdir = /opt/project env = .env debug = true logto = /var/log/uwsgi/uwsgi.log log-4xx = true log-5xx = true
Any guidance will be really helpful to troubleshoot.