Ubuntu / node.js löscht eingehende Anfragen

Ubuntu / node.js löscht eingehende Anfragen

Ich bekomme Anfragen auf einem node.js-Server. Ich habe den Testfall soweit vereinfacht, dass es sich um ein Problem mit der Systemeinrichtung handeln muss. Ich bin Entwickler und habe sehr wenig Erfahrung mit der Serveradministration, also muss ich etwas Offensichtliches übersehen haben. Der Server befindet sich auf Digital Ocean mit Standardeinrichtung für MEAN auf Ubuntu. Ich habe an der Servereinrichtung nicht viel geändert. Wo soll ich suchen?

Hier ist der Node-Server-Code (es ist der tatsächlich ausgeführte Code):

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');
});

Folgendes passiert unter Belagerung (tut mir leid, dass es so lang ist, aber es ist notwendig, um das Bild zu sehen). Der Logger auf der Serverseite zeigt, dass Express die Anfragen, deren Zeit abgelaufen ist, NICHT empfangen hat. In der Testumgebung gibt es keine Proxys oder ähnliches, Node läuft wie gezeigt direkt auf 9876.

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

Antwort1

Es handelte sich um ein Rechenzentrumsproblem. Die Diagnose erfolgte durch Ausführen einer Kopie des Servers in einem anderen Rechenzentrum.

Ich konnte mich nicht einmal beschweren, denn als ich es herausgefunden hatte, war es bereits behoben. Es hat mich 3 Tage gekostet. Danke, Digital Ocean!

verwandte Informationen