I've a db webhook set up on a table on insert, lately I noticed it doesn't call my api, and I wonder why, is there anyway to troubleshoot this? perhaps I can find anything in logs?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
Webhooks are a postgres trigger function (postgres log if error) and a pg_net call. The net schema has two tables one of which is the actual call and the other is the http_reponse from your network request.
the first has only a very few rows, the other is empty. I don't see any errors in the postgres log. I'm using the raw feature of Supabase Webhooks though I am aware that it is a trigger and pg_net under the hood. it has so far worked fine but only lately stopped unexpectedly, I thought it was my api, but my api is working when tested separately, and when a new row is inserted everything works in the db, except the db webhook isn't firing I believe.
If you do something that should generate a webhook call and go look at the request_queue table and don't see anything then your trigger is likely not firing OR erroring. But if erroring then should be in the Postgres log.
I'm really surprised because it does work sometimes, and when it works I can see that my api has been called in my own api logs, but then sometimes my api isn't getting called. which made me suspect that the problem lies in the supabase webhook
As I said it is just a trigger that calls pg_net though. So one of those two parts would not be working. Trigger is all postgres so not likely a bug. pg_net does have alot more going on... https://github.com/orgs/supabase/discussions/21023
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article. NOTE: version 0.10.0 of pg*net is out. You shou...
Then not sure. That is one thing that can be overwhelmed and there is a setting for that in pg_net (not sure about webhooks) but it is requests per second type thing.
I've a notify endpoint, which it was really easy to use with the webhook, the other endpoint I had to use a trigger because there's some logic that goes inside the trigger
I'm not seeing errors in the tables we talked about nor in the other logs of supabase. But that it now works hopefully it will continue to work, only time would tell