sockets - Node.js http.request failing exactly after 120 sec -


i know server.timeout , socket's keepalive timeouts has default timeout @ 120 sec. in case, have altered http agent setting 170 seconds, , socket.timeout , server timeout 170 seconds. still getting error econnreset "socket hangup".

below agent setting , socket time settings.

"proxy_agent": {     "maxsockets" : 256,     "maxfreesockets" : 256,     "keepalive" : true,     "keepalivemsecs" : 170000,     "keepalivetimeout" : 15000,     "timeout" : 170000 }, 

and socket settings

var setupsocket = function(socket) {     socket.setnodelay(true);     socket.settimeout(170000);     socket.server.timeout = 170000;     socket.setkeepalive(true,0);     return socket; }; 

below debugger screenshot showing custom values got set properly.

enter image description here

finally got problem. there 2 separate events http('connection') , https('secureconnection') , socket timeout disabled http previously. https requests still getting timedout @ default 120 seconds. after disabling sockets 'secureconnection' event, https requests working till given request timeout.

note: problem exists https , failed recognize crucial in solving. thanks.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -