Using TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS propery for prod

28 views
Skip to first unread message

Tromix Vl

unread,
Apr 22, 2021, 8:38:23 PM4/22/21
to HAPI FHIR
Hi.

I found a memory leak on 5.0.0 when request validation enabled. Approximately +300 kb for each bundle, if there are enough bundles coming in parallel.

In 12 threads, after processing 60'000 bundles, about 8Gb was busy. This memory remains amusing all the time, GC does not utilize it. Even after stopping and cooling the caches (as I guess).

Judging by the dump, almost all of the gain is in collections such as ArrayList / HashMap / LinkedHashMap and also r5.model.ElementDefinition with related fields.

I found that setting

TEST_SYSTEM_PROP_VALIDATION_RESOURCE_CACHES_MS=3600000 (1 hour instead of 10 seconds by default) helps to get rid of the leak (a small trend is still visible, but not significant).

My question is:
What are the consequences of using this new value of the parameter in the future? Decreased performance? Validation violation? Something else?

PS: I use my own set of definitions to validate StructureDefinitions / CapabilityStatement / CodeSystem / SearchParameter / ValueSet / etc.

Thanks
Max
Reply all
Reply to author
Forward
0 new messages