Hi ODK team and community,
1. What is the issue? Please be detailed.
After a network outage that lasted around 6 hours, our ODK Central server entered into a loop with this recurring error:
!! unexpected worker loop error: error: payload string too long
at Parser.parseErrorMessage (/usr/odk/node_modules/pg-protocol/...)
at ... new_audit_log() line 40 at PERFORM pg_notify('odk-events', js::text)>
The submissions are still being saved correctly in the database, but entities are not being created or updated, likely because the internal event system is blocked by an oversized payload.
We don’t have unusually large forms.
This seems like a reasonable workaround, but we would like to clarify a few things before attempting any manual intervention:
Has anyone else experienced this exact error after extended downtime or high submission activity?
Is there a safe way to flush the pending queue of events manually in PostgreSQL or ODK Central?
Is it recommended to patch the new_audit_log trigger or wait for a core-level fix?
Any guidance or shared experience would be greatly appreciated!
Thanks in advance.
2. What steps can we take to reproduce this issue?
It's hard to reproduce precisely, but this is what happened in our case:
The ODK Central server experienced a network outage (or firewall block) for approximately 6 hours.
During this time, submissions were still made by field teams and stored locally by ODK Collect.
Once the connection was restored, a batch of submissions was sent in quick succession to the Central server.
After this, the Central service started logging !! unexpected worker loop error: payload string too long repeatedly.
Submissions are stored in the PostgreSQL database, but entities are no longer being created or updated.
3. What have you tried to fix the issue?
Restarted all services using docker compose.
Removed orphan containers and verified all volumes and container states.
Confirmed the issue is in pg_notify inside the new_audit_log() function.
Reviewed logs to confirm that the error persists even after restart.
Checked that form submissions are saved correctly but entity creation is not triggered.
Avoided altering the new_audit_log trigger for now, pending guidance from the community.
4. Upload any forms or screenshots you can share publicly below.