首页 > gunicorn 启动问题 Failed to find application

gunicorn 启动问题 Failed to find application

如题,搜了一下没找到解决方案


如题,应该是你的directory设置错了,command=/usr/bin/gunicorn app:applicationapp是一个文件名,application是该文件中程序启动的一个对象,也有可能是这个设置没有对应上。你应该贴一下你的gunicorn代码出来的。


如果你用虚拟环境的gunicorn的话,应该在command中给出全路径,同时也提供python的路径,如:

command=/my/path/to/venv/bin/python /my/path/to/venv/bin/gunicorn application:app,application

是入口文件,app是里面入口函数,如通过app.run()执行。如果楼主还没有解决,建议把gunicorn配置文件和环境贴出来,这样更好分析。

【热门文章】
【热门文章】