Working and configuring timeouts is important, to ensure your app stays alive when services you depend on start to get really slow...
LHC forwards two timeout options directly to typhoeus:
timeout (in seconds) - Pass a long as parameter containing timeout - the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option may cause libcurl to use the SIGALRM signal to timeout system calls.
connecttimeout (in seconds) - Pass a long. It should contain the maximum time in seconds that you allow the connection phase to the server to take. This only limits the connection phase, it has no impact once it has connected. Set to zero to switch to the default built-in connection timeout - 300 seconds.
MINOR VERSION
Timeout
Working and configuring timeouts is important, to ensure your app stays alive when services you depend on start to get really slow...
LHC forwards two timeout options directly to typhoeus:
timeout
(in seconds) - Pass a long as parameter containing timeout - the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option may cause libcurl to use the SIGALRM signal to timeout system calls.connecttimeout
(in seconds) - Pass a long. It should contain the maximum time in seconds that you allow the connection phase to the server to take. This only limits the connection phase, it has no impact once it has connected. Set to zero to switch to the default built-in connection timeout - 300 seconds.LHC provides a timeout interceptor that let you apply default timeout values to all the requests that you are performig in your application.
Default Timeout Interceptor
Applies default timeout values to all requests made in an application, that uses LHC.
timeout
default: 15 secondsconnecttimeout
default: 1 secondOverwrite defaults