Ubuntu/node.js descartando solicitações recebidas

Ubuntu/node.js descartando solicitações recebidas

Estou recebendo solicitações descartadas em um servidor node.js. Simplifiquei o caso de teste a tal ponto que deve ser um problema com a configuração do sistema. Sou desenvolvedor e tenho muito pouca experiência com administração de servidores, então devo estar faltando algo óbvio. O servidor está na Digital Ocean com configuração padrão para MEAN no Ubuntu. Não mudei muito na configuração do servidor. Onde devo procurar?

Aqui está o código do servidor do nó (é o código real que está em execução):

var http = require('http'),
    express = require('express'),
    path = require('path');

var app = express();

var rcount=0;

app.use(function(req, res, next) {
  console.log('--'+rcount+':'+req.protocol+'://' + req.headers.host + req.originalUrl);
  rcount++;
  next();
});

app.use('/js',express.static(path.join(__dirname, 'public/js'), {maxAge: 86400000})); 

http.createServer(app).listen(9876, function(){
  console.log('Express server listening on port 9876');
});

Aqui está o que acontece sob o cerco (desculpe pela extensão, mas é necessário ver a foto). O logger no lado do servidor mostra que o Express NÃO recebeu as solicitações que expiraram. No ambiente de teste, não há proxies nem nada, o nó é executado diretamente no 9876 conforme mostrado.

MacBook-Air-alex:www alex$ siege -iv http://xxx.xxx.xxx.xxx:9876/js/animatescroll.js
** SIEGE 3.0.7
** Preparing 15 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200   0.10 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.10 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.14 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.10 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.10 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.14 secs:    7686 bytes ==> GET  /js/animatescroll.js
[error] socket: 209698816 connection timed out.: Operation timed out
[error] socket: 212381696 connection timed out.: Operation timed out
[error] socket: 208089088 connection timed out.: Operation timed out
[error] socket: 207015936 connection timed out.: Operation timed out
[error] socket: 209162240 connection timed out.: Operation timed out
HTTP/1.1 200   0.14 secs:    7686 bytes ==> GET  /js/animatescroll.js
[error] socket: 208625664 connection timed out.: Operation timed out
[error] socket: 205942784 connection timed out.: Operation timed out
[error] socket: 206479360 connection timed out.: Operation timed out
[error] socket: 205406208 connection timed out.: Operation timed out
[error] socket: 211308544 connection timed out.: Operation timed out
[error] socket: 210771968 connection timed out.: Operation timed out
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.14 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.15 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.40 secs:    7686 bytes ==> GET  /js/animatescroll.js
[error] socket: 210235392 connection timed out.: Operation timed out
HTTP/1.1 200   0.19 secs:    7686 bytes ==> GET  /js/animatescroll.js
[error] socket: 204869632 connection timed out.: Operation timed out
HTTP/1.1 200   0.11 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.16 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.16 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.17 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.10 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.14 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js
[error] socket: 211845120 connection timed out.: Operation timed out
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.12 secs:    7686 bytes ==> GET  /js/animatescroll.js
HTTP/1.1 200   0.13 secs:    7686 bytes ==> GET  /js/animatescroll.js

Responder1

Foi um problema de datacenter. Diagnosticado executando uma cópia do servidor em um datacenter diferente.

Nem cheguei a reclamar, já estava resolvido quando descobri. Custou-me 3 dias. Obrigado, Oceano Digital!

informação relacionada