Orthanc becomes unresponsive when deleting a large patient


I’m on Orthanc 1.5.6, Postgres Plugin 3.2.
Orthanc becomes completely unresponsive when I’m deleting a large patient. After the deletion is completed (~ a minute for ~1 Gb worth of images), Orthanc unfreezes again.

Is there a way to make Orthanc still handle other request while also deleting a patient?


Best Regards,

Could you provide more info about the environment? What OS? What resources are being used (CPU, IO, MEM) when Orthanc is unresponsive? Is postgresql being used for index and storage?

There probably are things Orthanc could do to make it less likely to become unresponsive, but deleting a gigabyte and several rows on a db might make some low-end systems unresponsive no matter what.

Chico Venancio


thanks for these questions. Here are the answers:

  • Orthanc is using on a Ubuntu Linux Host with 4 CPU Cores and 8GB of RAM. Postgres is used for index and storage. Postgres is running on the same physical host as Orthanc.
  • Whilst the delete is ongoing, one CPU Core is utilized, the other 3 being idle. There is no significant RAM usage. The top process during this time is the orthanc postgres connection thread.
  • Whilst the delete is ongoing, iostat reports A %idle of ~50-70%. (Orthanc is the only thing running on this host. Whilst Orthanc is not used, %idle is 97%). The maximum MB/s write I’ve seen during a delete is ~100MB/s, though the write hovers at around 30MB/s for a significant amount of the time. This adds up with the reported value for %idle as I am using Google Cloud persistent SSDs that have a maximum advertised sustained throughput of 240MB/s given my configuration (See https://cloud.google.com/compute/docs/disks/performance#ssd-pd-performance)
    I thus honestly do not think my system is the issue. I rather think that Orthanc is blocking somehow (maybe using up all available DB connections or locking), whilst the delete is ongoing.

This should be relatively simple to reproduce: Just delete a patient with lots of imaging data from Orthanc using the PostgreSQL plugin for index and storage. Whilst the delete is ongoing, try to do a query through the Rest API or even visit the Web Interface, which will be unresponsive for the time the delete is ongoing.

Hope I could provide helpful information.

Thanks in advance,

This is due to the fact that PostgreSQL storage is much slower than filesystem, and that transaction locks are present to ensure the consistency of the database.

If performance is important to you, please check out the following FAQ entry: