node.js - 登录系统nodejs在heroku中不起作用
问题描述
我制作了一个登录系统,可以在我的本地服务器上使用 MongoDB 连接并完成所有工作!但是当我将它部署到 Heroku 时,它一直有效,直到我注册/登录应用程序崩溃为止。
2020-09-06T05:21:29.834411+00:00 app[web.1]: at TLSSocket.emit (events.js:315:20)
2020-09-06T05:21:29.834412+00:00 app[web.1]: at net.js:674:12
2020-09-06T05:21:29.834413+00:00 app[web.1]: at TCP.done (_tls_wrap.js:567:7) {
2020-09-06T05:21:29.834413+00:00 app[web.1]: errorLabels: [ 'TransientTransactionError' ],
2020-09-06T05:21:29.834414+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2020-09-06T05:21:29.834414+00:00 app[web.1]: }
2020-09-06T05:21:30.042423+00:00 heroku[router]: at=info method=GET path="/" host=stud2emp.herokuapp.com request_id=005e4791-367b-46a7-97e6-0ddb254f0bc6 fwd="93.172.152.146" dyno=web.1 connect=0ms service=31ms status=304 bytes=276 protocol=https
2020-09-06T05:21:34.085261+00:00 heroku[router]: at=info method=GET path="/users/login" host=stud2emp.herokuapp.com request_id=f66c3b5e-e722-4bf0-8905-da9689c9096b fwd="93.172.152.146" dyno=web.1 connect=0ms service=7ms status=304 bytes=152 protocol=https
2020-09-06T05:22:07.270229+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/users/login" host=stud2emp.herokuapp.com request_id=9ae52ff0-7cfd-4dde-96eb-cd4a33116b30 fwd="93.172.152.146" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https```
解决方案
推荐阅读
- angular - 如何以角度动态分配模板引用变量
- pandas - Julia pandas - 如何将数据框附加在一起
- protractor - 从量角器执行 jar 文件
- python - Python:如何在正则表达式中保留字母数字英文、拉丁字符?
- r - 使用 for 循环多次运行模型,将其重命名并将其附加到列表中
- angular - 'ObservableMedia' 类型中的属性 'subscribe' 不可分配给基类型 'Subscribable' 中的相同属性
' - mongodb - $sort 更改聚合结果顺序后 $limit 的 MongoDB 值
- wxwidgets - 点击 wx.SpinCtrl 后出现 WxPython Pango 错误
- json - json 成功变量返回 undefined ,在 console.log 粘贴后工作
- php - 无法将图像数据写入路径 - 干预图像