Senaite-filestorage grows in size without active use

Hello,

Thanks for all the great hard work on Senaite.

Please when i run Senaite 2.x using docker ( Ozone HIS ), i get the senaite-filestorage volume increasing constantly with no active use. Please see logs generated below

Please how can this be resolved?

Much thanks for your swift anticipated response

With Regards

From the screenshot it looks to me like you have an external process add client contacts via the API.

Yes you are right. It’s the architecture of Ozone Health Information System GitHub - ozone-his/ozone-docker: A Docker Compose setup for running Ozone HIS

The issue is the file just keeps grown ad-infinitum go gigabytes in size when no clients are being added filling up space.

A way to reduce this would be much appreciated. Will also reach out to the Ozone community regarding this as it seems to be an issue coming from an external API feeding to Senaite. Any feedback from you will be much appreciated. With Regards

We also faced this issue.

Somehow i could fix by cancelling all orders from the affected patient in OpenMRS.

I found the patient like this:

  1. I found a fishy create request in the Senaite logs:
    10.0.0.20 - admin [26/Jun/2026:15:02:12 +0000] “POST /senaite/%40%40API/senaite/v1/AnalysisRequest/create/f068738ee634426a9cf59806b40350ab HTTP/1.0” 200 112 “-” “Apache-HttpClient/5.2.1 (Java/17.0.18)”
  2. The the queried manually the Senaite REST API to get more information via this URL
    http://10.0.0.21/senaite/@@API/senaite/v1/AnalysisRequest/f068738ee634426a9cf59806b40350ab
  3. There i spotted the Name attribute which contained the patient name with OpenMRS identifier like this Test Patient (100000A)
  4. With the ID 100000A went to OpenMRS, searched for the patient, went to Orders Page and cancelled all.
  5. For me this was the only affected patient and the senaite database stopped growing.

Side Notes:

  • Before, the Senaite database grew about 1MB per sec because it recreated the client object each second
  • I could sometimes compress the Senaite database within the ZEO container with ./bin/zeopack -D 0 but I think this command needs confirmation for production instances
  • I think the problem appears due to missing matching masterdata setup e.g. OpenMRS has a new lab order but the respective AnalysisRequests, SampleTypes and ARTemplate are not setup in Senaite. I saw this error line just before the POST request:
    10.0.0.20 - admin [26/Jun/2026:15:02:12 +0000] “GET /senaite/%40%40API/senaite/v1/ARTemplate?complete=true&catalog=senaite_catalog_setup&Description=163688AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.0” 200 14920 “-” “Apache-HttpClient/5.2.1 (Java/17.0.18)”
    ...
    File “/home/senaite/senaitelims/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/bika/lims/idserver.py”, line 237, in get_variables
    “sampleType”: context.getSampleType().getPrefix(),
    AttributeError: ‘NoneType’ object has no attribute ‘getPrefix’
  • We could also identify the problematic component: it is the eip-openmrs-senaite route - because once we stopped the container, the database stopped growing. Hence the ozone-his/eip-openmrs-senaite: Camel routes that integrate OpenMRS and SENAITE. should incorporate an update to catch this error and provide a warning message in the logs as initial solution imho.

Cheers,
Johannes