Impact Of HttpTimeout Value in Orthanc File

204 views
Skip to first unread message

salim.d...@gmail.com

unread,
Aug 10, 2017, 12:10:42 AM8/10/17
to Orthanc Users
Hello,

I just want to know abut the "HttpTimeout" value in orthanc.json and what is the impact if I will increase this value. By default this value is 10?

{"HttpTimeout" : 10}

Thibault Nélis

unread,
Aug 10, 2017, 6:31:22 AM8/10/17
to orthan...@googlegroups.com
Hello,
Last I checked it translated directly to cURL's CURLOPT_TIMEOUT
option[1] and this is used, AFAIK, for all outbound HTTP requests.

Because it tracks the entire request length, the need to increase it
for Orthanc (which often has to perform large transfers) is very common
in our experience.

I haven't yet confirmed that it disregards activity on the connection
(i.e. the timeout won't reset every time a chunk of data is received on
the socket to time out after X seconds of inactivity, but rather times
out exactly X seconds after the request started). From the
documentation, I assume it is so.


(Off-topic, but related:)

I've always meant to submit a PR to allow the use of
CURLOPT_LOW_SPEED_* as sensibly suggested in the cURL documentation:

"Since [CURLOPT_TIMEOUT] puts a hard limit for how long time a request
is allowed to take, it has limited use in dynamic use cases with
varying transfer times. You are then advised to explore
CURLOPT_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_TIME or using
CURLOPT_PROGRESSFUNCTION to implement your own timeout logic."

Feel free to contribute or just file an issue if you're interested.

[1] https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html
--
Thibault Nélis <t...@osimis.io>
Osimis

Sébastien Jodogne

unread,
Aug 11, 2017, 11:39:34 AM8/11/17
to Orthanc Users, salim.d...@gmail.com
Hello,

This option is used when Orthanc makes an outgoing HTTP query to some Web service.

The four most common use cases are currently:
The default value is 10 seconds. You might want to increase this value if doing large transfers against Orthanc peers or DICOMweb servers.

HTH,
Sébastien-

Deon Kuhn

unread,
Mar 13, 2018, 6:35:49 AM3/13/18
to Orthanc Users

Hi There

FYI setting 

`ENV HTTP_TIMEOUT=300`

has no affect on the advanced authorization plugin. On my local dev, where auth calls can take longer than 10secs to complete, setting the value has no affect the auth calls timing out.

Using latest version of Orthanc docker container, osimis/orthanc:18.3.0

Sébastien Jodogne

unread,
Jul 26, 2018, 7:05:03 AM7/26/18
to Orthanc Users
Hello,

According to this part of the documentation, you should be using "HTTP_CL_TIMEOUT" instead of "HTTP_TIMEOUT":

Sébastien-
Reply all
Reply to author
Forward
0 new messages