Orthanc auto-routing to peer - libCURL out of memory


We’ve got an Orthanc configured to do auto-routing to another Orthanc peer using a Lua script as described here: Server-side scripting with Lua — Orthanc Book documentation.
The Lua script is modified to send to a peer: Delete(SendToPeer(instanceId, ‘orthanc-node’))

Everything looks and works ok, but some times (might be a day, might be even less) the Orthanc that does the auto-routing starts sending out this message:

orthanc_1 | I0411 10:28:32.690554 JobsEngine.cpp:144] Executing job with priority 0 in worker thread 1: 86f31427-1798-46fd-895b-d4b4e7a13bc9

orthanc_1 | I0411 10:28:32.690621 StorePeerOperation.cpp:62] Lua: Sending instance 5ed4503f-20675032-bc23f256-f5136d0b-975ddc68 to Orthanc peer

orthanc_1 | I0411 10:28:32.690691 FilesystemStorage.cpp:155] Reading attachment “9ba9810a-d529-4059-9b4b-888334165cc5” of “DICOM” content type

orthanc_1 | I0411 10:28:32.705686 HttpClient.cpp:900] For performance, the HTTP header “Expect” should be set to empty string in POST/PUT requests

orthanc_1 | E0411 10:28:32.776344 HttpClient.cpp:68] Error code 27 in libcurl: Out of memory

orthanc_1 | I0411 10:28:32.776392 HttpClient.cpp:970] HTTP status code 0 in 70 ms after POST request on:

orthanc_1 | E0411 10:28:32.776417 OrthancException.h:86] Error in the network protocol: libCURL error: Out of memory

orthanc_1 | E0411 10:28:32.776473 StorePeerOperation.cpp:78] Lua: Unable to send instance 5ed4503f-20675032-bc23f256-f5136d0b-975ddc68 to Orthanc peer: Error in the network protocol

orthanc_1 | I0411 10:28:32.776714 DeleteResourceOperation.cpp:54] Lua: Deleting instance: 5ed4503f-20675032-bc23f256-f5136d0b-975ddc68

When that happens the images are not send to the node. The modality is a radiography scanner and some images it generates are around 30-40Mb.


  • osimis/orthanc:20.4.0
  • everything else is default

Any advice for this issue? Or how can I switch to a newer libcurl?

Many thanks,


Thanks for reporting this issue. This is actually known problem that results from the upgrade to OpenSSL 1.1.1, and that is already fixed in the mainline by the following changeset:

It will be part of forthcoming 1.6.1 maintenance release of Orthanc. You can already find precompiled, but unstable binaries at the following location:


Hi Sébastien,

Many thanks for your reply, I will test with the newer version of Orthanc.



Same issue as Alexandru.

We downgraded Orthanc waiting for the new release.

Thx Sébastien for you hard work :slight_smile:



Just to close this topic, the bug has been fixed within Orthanc 1.6.1 release on April 21 2020 and is available within Docker image osimis/orthanc:20.4.1 and upper versions.

Thanks Sébastien for the fix!