上下文
我们最近投入生产NodeJS服务器。
我们使用Express 4.x和Socket.IO 1.x,在像Socket.IO文档这样的端口上解释了这一点。
问题
实际上,我们可以在生产中访问/ api。但似乎我对/socket.io上的调用有问题。实际上,每个轮询请求(在我们的例子中这么多)都会向我发送一个类似下面的堆栈。
注意:我们在dev environnement(Windows Server)上没有这个问题,但是我们在生产中使用Debian。
NB2:我们在NGINX上使用SSL证书(处理请求的反向代理)
错误
12)
at next (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:261:10)
at query (/isp/www/effi-report.com/www/api/node_modules/express/lib/middleware/query.js:28:5)
at Layer.handle [as handle_request] (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/layer.js:82:5)
at trim_prefix (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:302:13)
at /isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:321:12)
at next (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:261:10)
at Function.proto.handle (/isp/www/effi-report.com/www/api/node_modules/express/lib/router/index.js:166:3)
at EventEmitter.app.handle (/isp/www/effi-report.com/www/api/node_modules/express/lib/application.js:170:10)
at Server.app (/isp/www/effi-report.com/www/api/node_modules/express/lib/express.js:28:9)
at Server.<anonymous> (/isp/www/effi-report.com/www/api/node_modules/socket.io/node_modules/engine.io/lib/server.js:369:22)
at Server.<anonymous> (/isp/www/effi-report.com/www/api/node_modules/socket.io/lib/index.js:258:16)
at Server.emit (events.js:98:17)
at HTTPParser.parser.onIncoming (http.js:2108:12)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
at Socket.socket.ondata (http.js:1966:22)
at TCP.onread (net.js:527:27)