Hi,
I have just pushed in the mainline a large refactoring of the HTTP framework of Orthanc to correctly handle HTTP Keep Alive. Indeed, previously, the "Content-Length" HTTP Header was not always properly set, which could corrupt the HTTP transfers.
There is now an experimental option in the configuration file that is called "KeepAlive". It defaults to "false". Turn it to "true" to enable keep-alive support. All my integration tests pass with this option enabled.
Unfortunately, when I enable keep-alive, I do not notice any performance improvement with my integration tests, even over a network connection.
Chris, could you kindly play with this option to make sure that it solves your performance problem?
Regards,
Sébastien-
PS 1: I had to upgrade from Mongoose 3.1 to Mongoose 3.8 to solve a timeout error that was only appearing with keep-alive enabled. For reference, here is the command line I use to simulate a high load on Orthanc [1]:
PS 2: Besides setting "enable_keep_alive" to "yes", I also had to set the HTTP header "Connection: keep-alive" in the answer [2,3].