https://supabase.com/ logo
#help
Title
# help
k

kvnam

04/19/2022, 11:44 PM
Hey, Supabase is suddenly returning a
pg_net background worker
error when trying to update / create rows in some tables. Any ideas on how I can fix this? Or what could be causing this? Should I just restart the server? Also I checked no changes were made to internal tables or foreign keys added.
Copy code
message: \"the pg_net background worker must be up when doing requests\", 
detail: Some(\"the pg_net background worker is down due to an internal error and cannot process requests\"), 
hint: Some(\"make sure that you didn't modify any of pg_net internal tables or used them for foreign key references\"), 
position: None, 
where_: Some(\"PL/pgSQL function _check_worker_is_up() line 4 at RAISE\\nSQL statement \\\"insert into net.http_request_queue(method, url, headers, body, timeout_milliseconds)\\n    values (\\n        'POST',\\n        net._encode_url_with_params_array(url, params_array),\\n        headers,\\n        convert_to(body::text, 'UTF8'),\\n        timeout_milliseconds\\n    )\\n    returning id\\\"\\nPL/pgSQL function http_post(text,jsonb,jsonb,jsonb,integer) line 42 at SQL statement\\nSQL statement \\\"SELECT http_post                 FROM net.http_post(\\n              url,\\n              payload,\\n              params,\\n              headers,\\n              timeout_ms\\n            )\\\"\\nPL/pgSQL function http_request() line 54 at SQL statement\"), schema: None, 
table: None, 
column: None, 
datatype: None, 
constraint: None, 
file: Some(\"pl_exec.c\"), 
line: Some(3859), 
routine: Some(\"exec_stmt_raise\")
n

Needle

04/19/2022, 11:44 PM
Hello @kvnam! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
s

silentworks

04/20/2022, 2:53 AM
Are you using
pg_net
in your database anywhere?
n

Needle

04/20/2022, 2:53 AM
kvnam (2022-04-19)
k

kvnam

04/20/2022, 10:59 AM
This is resolved, a trigger was accidentally set up using the table and has been deleted. All good now, thanks!
Just a note, so the issue reappeared. The trigger which was causing this was not listed in the Trigger UI, but when I ran a SQL command to list triggers, it was still there. I ran a DROP command to remove it and that resolved the issue, but it is a little unsettling to not know how it was in the
information_schema.triggers
table in the first place after deletion, but not showing up in the UI..?
s

silentworks

04/20/2022, 10:12 PM
The Triggers UI is still in Alpha Preview, so some of these features don't always show up as intended.
n

Needle

04/27/2022, 12:39 AM
Thread was archived by @kvnam. Anyone can send a message to unarchive it.