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
Node.js 我在打开heroku应用程序时出错,它显示代码=H12,状态为503_Node.js_Heroku - Fatal编程技术网

Node.js 我在打开heroku应用程序时出错,它显示代码=H12,状态为503

Node.js 我在打开heroku应用程序时出错,它显示代码=H12,状态为503,node.js,heroku,Node.js,Heroku,当试图浏览要从数据库中提取的内容时,尤其会发生错误 e、 g。 如果我转到我的登录页,很简单,没有连接db,它就会打开 但是,当尝试转到/books时,它将抛出一个错误,并且没有问题/register或/login,但在登录或注册后,会发生相同的错误 当我转到登录页或/login at=info method=GET path="/stylesheets/landing.css" host=zen-like-name.herokuapp.com request_id='some hex numb

当试图浏览要从数据库中提取的内容时,尤其会发生错误

e、 g。 如果我转到我的登录页,很简单,没有连接db,它就会打开

但是,当尝试转到
/books
时,它将抛出一个错误,并且没有问题
/register
/login
,但在登录或注册后,会发生相同的错误

当我转到
登录页
/login

at=info method=GET path="/stylesheets/landing.css" host=zen-like-name.herokuapp.com request_id='some hex numbers' fwd="ip" dyno=web.1 connect=0ms service=4ms status=304 bytes=237 protocol=https

at=info method=GET path="/stylesheets/main.css" host=zen-like-name.herokuapp.com request_id='some hex numbers' fwd="ip" dyno=web.1 connect=0ms service=4ms status=304 bytes=237 protocol=https
尝试登录或浏览/books页时记录

at=error code=H12 desc="Request timeout" method=POST path="/login" host=zen-like-name.herokuapp.com request_id="some hex numbers" fwd="IP" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https

at=error code=H12 desc="Request timeout" method=GET path="/books" host=zen-like-name.herokuapp.com request_id="some hex numbers" fwd="IP" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
  • noje.js
  • 已连接到应用程序
  • 在heroko上安装mongoose
    “heroku运行npm安装mongoose”

  • H12是请求超时,当您访问mongoose(登录和浏览)时,它看起来需要花费太长的时间,或者它无法连接到数据库。应用程序启动时还有其他错误吗?我想我已经找到了解决方案。我必须允许所有的IP地址。