Skip to content

Optimise orthanc's use of postgres database#645

Merged
stefpiatek merged 4 commits into
mainfrom
stefpiatek/orthanc-housekeeping
Jun 24, 2026
Merged

Optimise orthanc's use of postgres database#645
stefpiatek merged 4 commits into
mainfrom
stefpiatek/orthanc-housekeeping

Conversation

@stefpiatek

Copy link
Copy Markdown
Contributor

Description

Updating orthanc caused different tags to be archived in the database and pulling from VNA was very slow. Also encountered errors from postgres plugin as postgres was out of memory in shm.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Suggested Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have passed on my local host device. (see further details at the CONTRIBUTING document)
  • Make sure your branch is up-to-date with main branch. See CONTRIBUTING for a general example to syncronise your branch with the main branch.
  • I have requested review to this PR.
  • I have addressed and marked as resolved all the review comments in my PR.
  • Finally, I have selected squash and merge

Otherwise pulling into orthanc is very slow
Orthanc was unable to process updates because
shm was limited

orthancorthanc-raw-1  | W0608 15:58:08.309266          DICOM-2 postgresql-index:/DatabaseBackendAdapterV4.cpp:1537] An SQL transaction failed and will likely be retried: ERROR:  could not resize shared memory segment "/PostgreSQL.684568212" to 2097152 bytes: No space left on device
@stefpiatek stefpiatek requested a review from p-j-smith June 24, 2026 11:24
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.79%. Comparing base (df58691) to head (b039490).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #645   +/-   ##
=======================================
  Coverage   87.79%   87.79%           
=======================================
  Files          78       78           
  Lines        3735     3735           
=======================================
  Hits         3279     3279           
  Misses        456      456           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@p-j-smith p-j-smith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just a minor change to the description of the schedule

Comment thread orthanc/orthanc-raw/config/orthanc.json Outdated
stefpiatek and others added 2 commits June 24, 2026 17:28
Co-authored-by: Paul Smith <paul.j.smith@ucl.ac.uk>
@stefpiatek stefpiatek enabled auto-merge (squash) June 24, 2026 16:28
@stefpiatek stefpiatek merged commit 7f5399f into main Jun 24, 2026
11 checks passed
@stefpiatek stefpiatek deleted the stefpiatek/orthanc-housekeeping branch June 24, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants