-
-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Bug report
Once pg_net reaches a certain number of jobs, jobs start to time out aggressively. This makes it unsuitable for any type of production workload where you may be dealing with a burstable influx of data. As an example, we wrote a function to inject jobs from Supabase to SQS and thought we could rely on pg_net. It works fine if you inject ~10 jobs at a time, but once you start going into larger numbers, EVERYTHING times out. This clearly is not SQS, as we moved to pgmq instead of pg_net, and the problems disappeared immediately.
I like and support the idea of this project, but it feels flimsy as a core module of Supabase. I cannot recommend it to anyone at this time.
Just to show that I am not alone, lots of people are having similar experiences.
https://www.reddit.com/r/Supabase/comments/1hc4398/has_anyone_ever_needed_to_expand_pg_net_beyond/
Describe the bug
Jobs queued with pg_net cascade into timeouts as the backlog is increased.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Setup a trigger that fires off a pg_net request.
- Fire the trigger for ~ 200 rows or more.
- Everything starts to timeout.
Expected behavior
A job backlog is okay. There should not be a timeout issue.
Screenshots
postgres=> select id, status_code, timed_out, error_msg from net._http_response limit 50;
id | status_code | timed_out | error_msg
--------+-------------+-----------+---------------------
1 | 200 | f |
186188 | 200 | f |
147 | | | Timeout was reached
148 | | | Timeout was reached
149 | | | Timeout was reached
150 | | | Timeout was reached
151 | | | Timeout was reached
152 | | | Timeout was reached
153 | | | Timeout was reached
154 | | | Timeout was reached
155 | | | Timeout was reached
156 | | | Timeout was reached
157 | | | Timeout was reached
158 | | | Timeout was reached
159 | | | Timeout was reached
160 | | | Timeout was reached
161 | | | Timeout was reached
162 | | | Timeout was reached
163 | | | Timeout was reached
164 | | | Timeout was reached
165 | | | Timeout was reached
166 | | | Timeout was reached
167 | | | Timeout was reached
168 | | | Timeout was reached
169 | | | Timeout was reached
170 | | | Timeout was reached