$reindex stuck with hapi 6.10.0

22 views
Skip to first unread message

Johanna Häusler

unread,
Aug 7, 2025, 4:10:16 AMAug 7
to HAPI FHIR
Hello,

I have a rather urgent issue with a hapi deployment. We need to execute the /$reindex operation and it was working fine on all test systems. The largest test system was 10GB in size and it took less than 20 minutes there, but on the production system it seems to be stuck for 6 days now.

It is a container deployment, based on the hapi-fhir starter project.
The DB size is roughly 100GB, there are the following resources (same resource types as in the test system):
- Appointment: 2M
- CodeSystem: 27 (but they are really huge)
- Encounter: 3.6M
- Immunization: 2.2M
- ImmunizationRecommendation: 300k
- Location: 400
- Observation: 800
- Organization: 400
- Patient: 360k
- Practitioner: 3k
- SearchParameter: 1
- StructureDefinition: 68
- Subscription: 20

We can see in the logs that the task is not completely idle:
2025-08-07 06:55:55.171 [hapi-fhir-jpa-scheduler-clustered-2] INFO  c.u.fhir.log.batch_troubleshooting Job 51a7e3d6-f560-4369-8647-595b19ad005d of type REINDEX has status IN_PROGRESS - 0 records processed 

Is it possible that the task is really not done yet? Is there something we can do to stop the task? Can we do something to make it more performant?

Thanks a lot,
cheers, 
Johanna

James Agnew

unread,
Aug 7, 2025, 5:26:16 AMAug 7
to Johanna Häusler, HAPI FHIR
That's quite an old version of HAPI, there have been a lot of improvements to the reindex job since then including a number of performance and stability improvements.

You can cancel the job by purging the BT2_JOB_INSTANCE and BT2_WORK_CHUNK tables, and I'd recommend upgrading your system when possible to take advantage of those improvements.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hapi-fhir/27fe3199-8baf-4b16-a490-1b81035fed75n%40googlegroups.com.

Johanna Häusler

unread,
Aug 13, 2025, 1:46:43 AMAug 13
to HAPI FHIR
For everyone with a similar issue, here a quick update:

We gave it some more time, but also after 10 days, the task was stuck with the same log message (0 records processed).
Thanks for the input James, we removed the task from the DB as adviced and we will now try to rerun the task per resource type using a body like this
{
"resourceType": "Parameters",
"parameter": [
{
"name": "url",
"valueString": "Encounter?"
}
]
}

Thanks again,
Cheers,
Johanna
Reply all
Reply to author
Forward
0 new messages