# Possible Memory Leak with Multiframe DICOM (Orthanc+OHIF)

**URL:** https://discourse.orthanc-server.org/t/possible-memory-leak-with-multiframe-dicom-orthanc-ohif/3988
**Category:** General
**Created:** [October 16, 2023, 11:47pm UTC](https://discourse.orthanc-server.org/t/possible-memory-leak-with-multiframe-dicom-orthanc-ohif/3988 "2023-10-16T23:47:54Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [October 17, 2023, 8:01am UTC](https://discourse.orthanc-server.org/t/possible-memory-leak-with-multiframe-dicom-orthanc-ohif/3988/2 "2023-10-17T08:01:44Z")

</div>

Hi,

For Issue 1:  
I’m not sure what version you are actually using. I tried with `osimis/orthanc:23.9.2` and `docker stats` does not show memory usage higher than 600-700 MB that goes down to 200-300 MB after loading. Frames 94 opens correctly

For Issue 2:  
Indeed, I observe high cpu load when ingesting but this is expected since transcoding occurs.  
When viewing, there is a high CPU indeed while the HTTP threads are serving the frames and extracting them from the multi-frame files. The messages about transcoding are misleading as explained in [this thread](https://discourse.orthanc-server.org/t/dicomweb-plugin-1-13-possible-unnecessary-transcoding/3979/2).

The memory usage goes up to 2.5 GB which is actually the size of the study once stored uncompressed. I tried limiting the container allocated memory to 4 GB and reload the OHIF viewer many times and its not growing and sometimes going back to 1 GB so I don’t think there is a leak here.  
Feel free to check the implementation notes about [memory consumption](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/ImplementationNotes/memory_consumption.txt) for more details.

So, nothing to worry about so far. But feel free to correct me if I’m wrong.

Best regards,

Alain.

---

_[View the full topic](https://discourse.orthanc-server.org/t/possible-memory-leak-with-multiframe-dicom-orthanc-ohif/3988)._
