When i trying to ingest large tracks (30+ minutes length) it ingests very long:
debug: Ingested new track in 215262ms. track_id=116
After those ingests, no response returned to client. Added event listeners on created sockets:
server.on('connection', function(socket) {
log.info('SOCKET OPENED' + JSON.stringify(socket.address()));
socket.on('end', function() {
log.info('SOCKET END: other end of the socket sends a FIN packet');
});
socket.on('timeout', function() {
log.info('SOCKET TIMEOUT');
});
socket.on('error', function(error) {
log.info('SOCKET ERROR: ' + JSON.stringify(error));
});
socket.on('close', function(had_error) {
log.info('SOCKET CLOSED. IT WAS ERROR: ' + had_error);
});
});
Got those messages on middle of ingest:
info: SOCKET TIMEOUT
info: SOCKET CLOSED. IT WAS ERROR: false
But on client socket do not get closed, so client wait for response. End of ingest completed with success, response sent (on closed socket!), but client still wait.
debug: Ingested new track in 215262ms. track_id=116
info: undefined - - [Fri, 10 Jan 2014 11:06:45 GMT] "POST /ingest HTTP/1.1" 200 60 "" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"
info: ####--SENDING RESPONSE--####
info: headers:{"Content-Type":"application/json","Content-Length":60}
info: body:{"track_id":116,"track":"Interny.167.SATRip","success":true}
info: ####--RESPONSE FINISH--####
No idea how to block those timeouts. Removed all timeouts from server code. Tried to add KeepAlive, no result.
socket.setKeepAlive(true);
Two questions:
How to prevent socket bultin timeout?
Is it normal for node-echoprint-server to do such long ingests? (about 200 seconds!)
Maybe better to divide this large track to few small? (if large tracks bad for echoprint)
When i trying to ingest large tracks (30+ minutes length) it ingests very long:
After those ingests, no response returned to client. Added event listeners on created sockets:
Got those messages on middle of ingest:
But on client socket do not get closed, so client wait for response. End of ingest completed with success, response sent (on closed socket!), but client still wait.
No idea how to block those timeouts. Removed all timeouts from server code. Tried to add KeepAlive, no result.
Two questions:
Thanks!