1

I am using "connect-timeout": "^1.7.0" as a top-level middleware in my express.js 4.12 ("express": "^4.12.3") app. I have no problem in using it as such. I can set the timeout to 50 seconds, 5 seconds, 1 second, all of which function perfectly fine. HOWEVER, I'm noticing that if I set the connect-timeout timeout value to anything greater than 110 seconds, the app will still timeout after 110 seconds with the following message: "HTTP request was terminated because the script did not produce output for 110 seconds"

Is there some other setting that needs to be adjusted? I can't find any reference of such a setting. Any help or insight would be very much obliged! Let me know if you need any more info from me. Thanks!

Best, Chris

(Do not worry that the process itself is taking more than 110 seconds, this is intended behavior)

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Chris Covney
  • 819
  • 1
  • 7
  • 11

2 Answers2

0

It might be possible but I doubt it. Only your own custom client would wait that long though. And if its your client you might still need to output something to keep the connection open. You could output a newline or . every 30 seconds.

Interested to hear if there is a way. I have found that people really don't want to leave idle HTTP connections open so you are swimming upstream.

Are you sure your client didn't disconnect?

Other options are things like RPC, TCP server, polling an HTTP endpoint for status.

Jason Livesay
  • 6,317
  • 3
  • 25
  • 31
  • Hi Jason, thanks for the input. Yes, I'm sure the client didn't disconnect. I was under the impression that connect-timeout was created for the sole purpose of augmenting the express.js timeout settings. If this is not truly not possible, then how useless is this middleware? They should have called it, connect-timeout-dont-set-it-higher-than-110seconds – Chris Covney Sep 28 '15 at 17:38
0

The node.js app is hosted on an Apigee Private Cloud VM cluster, and the timeout is occuring due to a timeout property on the Router/Message Proc. VM.

Within the nodejs.properties file, the property http.request.timeout.seconds is set to 110 seconds by default. One could augment this value to the desired value or set it to 0 (which effectively disables the timeout).

Best, Chris

Chris Covney
  • 819
  • 1
  • 7
  • 11