Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获得;错误R10(启动超时)->;Web进程在启动后60秒内绑定到$PORT失败”;关于python_Python_Heroku_Server_Webhooks - Fatal编程技术网

获得;错误R10(启动超时)->;Web进程在启动后60秒内绑定到$PORT失败”;关于python

获得;错误R10(启动超时)->;Web进程在启动后60秒内绑定到$PORT失败”;关于python,python,heroku,server,webhooks,Python,Heroku,Server,Webhooks,我正在使用flask在Python上开发一个应用程序,在尝试将其部署到Heroku时出现了以下错误: 错误R10(启动超时)->Web进程在启动后60秒内绑定到$PORT失败 在Heroku日志上,我可以看到这一行 我尝试过的可能性很少 在我的Procfile中,我编写了这个web:python hello mysql.py 我还尝试了web:python hello-mysql.py runserver 0.0.0.0=$PORT 在Procfile中将“web”替换为“worker” 就@

我正在使用flask在Python上开发一个应用程序,在尝试将其部署到Heroku时出现了以下错误:

错误R10(启动超时)->Web进程在启动后60秒内绑定到$PORT失败

在Heroku日志上,我可以看到这一行

我尝试过的可能性很少

  • 在我的Procfile中,我编写了这个
    web:python hello mysql.py

  • 我还尝试了
    web:python hello-mysql.py runserver 0.0.0.0=$PORT

  • 在Procfile中将“web”替换为“worker”


  • 就@damien而言,您似乎没有绑定到
    $PORT
    env变量。以下是一些可能会有所帮助的文档:和


    另外,不要将进程重命名为“worker”,因为只有名为
    web
    的进程才能通过http/https访问

    如果您查看日志行,您的应用程序将从端口5000启动。它需要在设置为的端口上启动$PORT@DamienMATHIEU我试过$PORT…但从你的角度来看,你能告诉我它是如何工作的吗?它看起来不像是在使用任何Python标准服务器,比如gunicorn。因此,在引导服务器时,您需要自己处理端口,使用
    os.environ['port']
    而不是5000。如何绑定到
    $port
    env var?在我的例子中,我使用selenium来自动化Chrome中的一些任务,并得到相同的错误。