FHIR Chat · slow cronjobs in hapi server? · hapi

Stream: hapi

Topic: slow cronjobs in hapi server?


view this post on Zulip Carl Anderson (Sep 24 2020 at 19:08):

I've noticed something odd with my server and I'm looking to know if this is expected behavior, or if there's a configuration parameter I can modify to adjust this effect I've noticed.

So, I've been experimenting with loading tagged Group data into a locally-running, dockerized, hapi server (v5.0.0).

In my test case I POST a transaction bundle which creates ~5 Group resources, each tagged with http://hl7.org/Connectathon|2020-Sep. The server accepts the transaction just fine.

However, when I attempt to view the Groups in the server browser - I often see an empty bundle. It eventually appears if I refresh repeatedly. In fact, after my system clock reaches 35 seconds into the minute (which I discovered through trial and error), the bundle always appears.

To me, this looks like a cron (or quartz, or whatever) scheduled job, which is fine if it is.

The problem, though, is that when I try to run my script again - my logic first attempts to query the server to delete any Group resources tagged with that value. Until the 52nd second of the minute has passed (another number discovered through trial and error), this query returns zero matching resources and nothing is deleted.

Could this behavior be explained by the presence of a cron-scheduled task to refresh a tag-based index (or something)? Or maybe I'm doing something wrong...

In any case, I'd like more fidelity from my server, if that's possible. Any ideas?


Last updated: Apr 12 2022 at 19:14 UTC