We have systems that are running Orthanc 1.12.9 with PostgreSQL Plugin for indexing. We set MaximumStorageSize to limit disk usage. Previously if you reduce MaximumStorageSize it would cleanup old scans to reduce disk usage.
With our current systems, if you reduce MaximumStorageSize (say from 10000 to 5000) and restart Orthanc, the following logs are shown.
dicom-1 | W0902 15:37:48.673241 MAIN main.cpp:1757] The DB latency is 102 µs
dicom-1 | W0902 15:37:48.673281 MAIN HttpClient.cpp:1206] HTTPS will use the CA certificates from this file: /etc/ssl/certs/ca-certificates.crt
dicom-1 | W0902 15:37:48.673780 MAIN LuaContext.cpp:95] Lua says: Lua toolbox installed
dicom-1 | W0902 15:37:48.674012 MAIN LuaContext.cpp:95] Lua says: Lua toolbox installed
dicom-1 | W0902 15:37:48.674578 MAIN ServerContext.cpp:607] Disk compression is enabled
dicom-1 | W0902 15:37:48.674594 MAIN ServerIndex.cpp:402] No limit on the number of stored patients
dicom-1 | W0902 15:37:48.674602 MAIN ServerIndex.cpp:426] At most 195.31GB will be used for the storage area
dicom-1 | E0902 15:37:49.709203 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:50.724365 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:51.741876 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:52.757103 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:53.772639 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:54.789029 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:55.806505 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:56.822290 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:57.839087 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:58.857099 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:37:59.878736 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:38:00.902661 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
dicom-1 | E0902 15:38:01.927175 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
I think there is an issue how Orthanc is trying to clean up the old files on startup and there is an issue preventing Orthanc starting.
We use docker with orthancteam/orthanc:lastest and postgresql:17-alpline images.
I’m actually seeing the same behavior but this does not prevent Orthanc from starting.
If I enable the verbose logs, I do see that files are being deleted and that the DB HOUSEKEEPING thread is indeed trying to run a bit too early but, at the end, Orthanc starts…
I0904 18:54:11.284456 MAIN FilesystemStorage.cpp:290] Deleting attachment "ef47a4c5-1675-4f4d-9e02-c9f9378a99ee" of type 1
I0904 18:54:11.304725 MAIN FilesystemStorage.cpp:290] Deleting attachment "c1694d80-f16b-4cf2-b866-80bad24556c7" of type 1
I0904 18:54:11.325092 MAIN FilesystemStorage.cpp:290] Deleting attachment "cf7e2832-0810-4ab5-b14e-2fa586b69fb3" of type 1
I0904 18:54:11.345443 MAIN FilesystemStorage.cpp:290] Deleting attachment "a182ad38-9557-4ef7-a0cc-220517fcadbc" of type 1
I0904 18:54:11.365827 MAIN FilesystemStorage.cpp:290] Deleting attachment "65e191e8-9765-462b-82a7-90a2258a0cc3" of type 1
I0904 18:54:11.386130 MAIN FilesystemStorage.cpp:290] Deleting attachment "5108fda0-79fa-4c0f-8b2e-580cc8bc22e1" of type 1
I0904 18:54:11.406397 MAIN FilesystemStorage.cpp:290] Deleting attachment "e35e154c-2b28-4cf6-946a-ad378b90ae6c" of type 1
E0904 18:54:11.410355 DB HOUSEKEEPING PluginsManager.cpp:201] Exception while invoking plugin service 31: Plugin trying to call the database during its initialization
I0904 18:54:11.426662 MAIN FilesystemStorage.cpp:290] Deleting attachment "fc6acd65-c651-444b-8ced-76d32e6b879c" of type 1
I0904 18:54:11.446974 MAIN FilesystemStorage.cpp:290] Deleting attachment "a9e2d95d-bc6f-43a2-96b9-ce44ee07edd2" of type 1
I0904 18:54:11.467373 MAIN FilesystemStorage.cpp:290] Deleting attachment "1b4ea113-a0e6-4087-a3c1-e112b294ae33" of type 1
...
I0904 18:54:13.326283 MAIN FilesystemStorage.cpp:290] Deleting attachment "77f95ad7-24ea-4bf1-885f-42b62705443f" of type 1
W0904 18:54:13.350313 MAIN ServerIndex.cpp:443] Maximum Storage mode: Recycle
I0904 18:54:13.354869 MAIN ServerContext.cpp:306] The last execution of Orthanc has archived no job
I0904 18:54:13.355726 JOBS-WORKER-0 JobsEngine.cpp:127] (jobs) Worker thread 0 has started
I0904 18:54:13.355921 JOBS-WORKER-1 JobsEngine.cpp:127] (jobs) Worker thread 1 has started
W0904 18:54:13.355981 MAIN JobsEngine.cpp:276] The jobs engine has started with 2 threads
I0904 18:54:13.356400 MAIN DicomServer.cpp:138] (dicom) Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
I0904 18:54:13.356588 MAIN DicomServer.cpp:426] (dicom) Orthanc SCP will *not* use DICOM TLS
I0904 18:54:13.356627 MAIN DicomServer.cpp:434] (dicom) The embedded DICOM server will use 4 threads
I0904 18:54:13.358635 DICOM-SERVER DicomServer.cpp:66] (dicom) DICOM server started
W0904 18:54:13.358640 MAIN main.cpp:1375] DICOM server listening with AET ORTHANC on port: 4244
I0904 18:54:13.358781 MAIN HttpServer.cpp:1687] (http) This Orthanc server uses CivetWeb as its embedded HTTP server
I0904 18:54:13.358839 MAIN HttpServer.cpp:2203] (http) The embedded HTTP server will use 20 threads
I0904 18:54:13.358888 MAIN HttpServer.cpp:2039] (http) HTTP keep alive is enabled
I0904 18:54:13.358926 MAIN HttpServer.cpp:2053] (http) HTTP keep alive Timeout is now 1 seconds
W0904 18:54:13.358986 MAIN HttpServer.cpp:2122] HTTP compression is disabled
I0904 18:54:13.359016 MAIN HttpServer.cpp:2216] (http) TCP_NODELAY for the HTTP sockets is set to true
I0904 18:54:13.359068 MAIN HttpServer.cpp:2236] (http) Request timeout in the HTTP server is set to 30 seconds
W0904 18:54:13.359104 MAIN main.cpp:1094] ====> Remote access is enabled while user authentication is explicitly disabled, your setup is POSSIBLY INSECURE <====
I0904 18:54:13.359136 MAIN main.cpp:1212] Version of Lua: Lua 5.4
W0904 18:54:13.359165 MAIN main.cpp:1223] Remote LUA script execution is disabled
W0904 18:54:13.359214 MAIN main.cpp:1235] REST API cannot write to the file system because the "RestApiWriteToFileSystemEnabled" configuration is set to false. The URI /instances/../export is disabled. This is the most secure configuration.
I0904 18:54:13.359302 MAIN HttpServer.cpp:2283] (http) Branching WebDAV bucket at: /webdav
I0904 18:54:13.359345 MAIN HttpServer.cpp:1735] (http) Starting embedded Web server using Civetweb
I0904 18:54:13.367275 MAIN OrthancWebDav.cpp:1691] Starting the WebDAV upload thread
W0904 18:54:13.367661 MAIN HttpServer.cpp:1880] HTTP server listening on port: 8044 (HTTPS encryption is disabled, remote access is allowed)
W0904 18:54:13.367708 MAIN main.cpp:967] Orthanc has started
I0904 18:54:13.367773 MAIN OrthancPlugins.cpp:3354] (plugins) Plugin making REST GET call on URI /plugins (built-in API)
I0904 18:54:13.367927 MAIN OrthancPlugins.cpp:3354] (plugins) Plugin making REST GET call on URI /plugins/orthanc-explorer-2 (built-in API)
I0904 18:54:13.368052 MAIN OrthancPlugins.cpp:3354] (plugins) Plugin making REST GET call on URI /plugins/postgresql-index (built-in API)
I0904 18:54:13.368175 MAIN LuaScripting.cpp:918] Starting the Lua engine
Can you double check on your side ?
Note that I have not tried with Docker but with my dev versions but this should not affect this kind of behavior.