Memory leak problem. Server crash.

Hello. There is Orthanc installed from the repositories running Ubuntu 20.04 Server LTS. PostgreSQL DBMS is used as storage. 2 devices are connected which successfully send their data. The problem is that after a while the server is running while actively downloading data, the Orthanc process stops. Only server reboot helps. 8 CPU cores and 18 GB of RAM are allocated for work. How can the situation be corrected? I read the article about allocating the number of Arenas, but I don’t quite understand how to apply this to a non-Docker installation of Orthanc.

orthanc_memory.png

Hello,

Ubuntu 20.04 comes with the old version 1.5.8 of Orthanc, that is almost 2 years old.

You should first try with the latest version of Orthanc (1.9.4 at the time of writing) and of the PostgreSQL plugins (4.0), which can for instance be done by compiling from sources:
https://book.orthanc-server.com/users/cookbook.html#obtaining-binaries

If this doesn’t solve your issue, please provide a full minimal working example so that other people can reproduce your problem:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Sébastien-

Do you think it is correct to build a deb package on an intermediate machine using checkinstall, and then deploy it in a production environment after removing the old package? Or is it better to follow the Docker route? Also, please clarify, is it worth keeping the files in PostgreSQL DBMS or separately on disk, but only indexes in the database?

понедельник, 5 июля 2021 г. в 14:32:19 UTC+3, s.jo...@gmail.com:

As you are visibly focused on Ubuntu, the best would be to contribute by working on a Ubuntu backport:
https://wiki.ubuntu.com/UbuntuBackports

That being said, as with any free and open-source software, compiling from sources is the best way to have Orthanc tuned for your specific system.

Regarding the last part of the question, please check out the Orthanc Book:
https://book.orthanc-server.com/faq/scalability.html

“We suggest to use the latest release of the PostgreSQL plugin to store the database index (4.0 at the time of writing). Make sure that EnableIndex is set to true. […] We suggest to use the default filesystem storage area. Of course, make sure that the filesystem is properly backed up, and that technologies such as RAID are enabled. Make sure that the option EnableStorage of the PostgreSQL plugins is set to false.”

I managed to start 2 containers with PostgreSQL and Orthanc. And a number of new questions arose to which I cannot find answers in the documentation. I am running containers with the following parameters:

Orthanc
docker run -e TZ = Europe / Kiev --name “orthanc” -p 4242: 4242 -p 80:80 --rm -v / tmp / orthanc-files /: / var / lib / orthanc / db / -v / tmp / orthanc-files / orthanc.json: /etc/orthanc/orthanc.json: ro jodogne / orthanc-plugins: 1.9.4

PostgreSQL
docker run -e TZ = Europe / Kiev --name postgres -e POSTGRES_USER = postgres -e POSTGRES_PASSWORD = DicomDicom --rm -v / tmp / orthanc-db /: / var / lib / postgresql / data postgres

How can I set up the autostart of containers correctly? And as I understand it, PostgreSQL should be started first. Will the IP address of the PostgreSQL container change after host reboot?
The second question has to do with configuring Orthanc plugins. I want to disable unnecessary ones. How to do it?
I also ask you to tell me how can I now correctly take pictures from the problematic Orthanc server to new server based on Docker?

понедельник, 5 июля 2021 г. в 14:52:02 UTC+3, s.jo...@gmail.com:

(1) You cannot control the autostart of containers with Docker alone. You’ll have to use Docker Compose:
https://docs.docker.com/compose/

If you don’t want Docker Compose, on GNU/Linux distributions, you can control the order of service startup using the “Required-Start” / “Sould-Start” primitives from “init”, or the “After”/“Wants” primitives from “systemd”:
https://book.orthanc-server.com/faq/debian-daemon.html

In either case, this is not an Orthanc-related question, but a general sysadmin question. Get in touch with the Ubuntu community.

(2) This is explained in the Orthanc Book, in the section about fine-tuning the configuration:
https://book.orthanc-server.com/users/docker.html#fine-tuning-the-configuration

An ops audience might be interested in using the “osimis/orthanc” images in place of the “jodogne/orthanc[-plugins]” images (the latter are primarily targeted at developers), as you can control the enabled plugins by environment variables:
https://book.orthanc-server.com/users/docker-osimis.html

(3) The migration between two Orthanc servers is also explained in the Orthanc Book:
https://book.orthanc-server.com/users/replication.html

Sébastien-