We have detected an error message similar to the following example, in some projects on Hasura Cloud:
“event trigger "foo_event_trigger" on table "foo" not found”
This happens when the event trigger definition no longer exists in the metadata but the associated Postgres trigger exists in the database which impacts the resource consumption in your project's database.
- Make sure that the event trigger
foo_event_trigger
doesn’t exist To do this, visit console of the project > Go to events > search forfoo_event_trigger
Optionally metadata definition can be checked - Check the postgres trigger definition notify_hasura_foo_event_trigger_INSERT/ notify_hasura_foo_event_trigger_UPDATE/ notify_hasura_foo_event_trigger_DELETE
exists on the table foo
The example below shows the Trigger notify_hasura_move_update_UPDATE exists for moves table
- Go to Project console > DATA > SQL
- Check the pending events
select count(1) from hdb_catalog.event_log where trigger_name = '<event-trigger-name>' and archived = 'f';
- Archive the pending events so Hasura doesn’t process them (we have fixed the issue and we would be rolling it out soon)
BEGIN TRANSACTION;
update table hdb_catalog.event_log set archived = 't' where trigger_name = 'move_update' and archived = 'f';
COMMIT;
- Delete the pg_trigger
Visit console of the project > Go to data > table (table name from email) > Modify > Triggers and delete triggers found in the previous step “How to check”.
Do make sure not to delete any other triggers.
Post this activity, Please check the DB resources. Please observe the performance over a couple of days before making any decision to scale down. We expect the performance to improve. Performance improvement is based on the number of undelivered events.
We have identified the root cause and fixed the underlying issue along with additional checks and balances to the overall process. Please feel free to reach out to us with any thoughts/questions.