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

gokatz

06/09/2022, 3:01 AM
Hey team, I'm running a Cron job using the cron extension from within Supabase SQL editor. I'm getting
Operation timed out after 5001 milliseconds with 0 bytes received
when my API used in the cron is taking a long time to resolve. Any idea how to increase the timeout?
n

Needle

06/09/2022, 3:01 AM
Hello @gokatz! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! 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.
g

garyaustin

06/09/2022, 3:29 AM
I don't think it is cron. It is probably http extension if you are using that. https://github.com/pramsey/pgsql-http There is a timeout of 5 seconds default.
Copy code
By default a 5 second timeout is set for the completion of a request. If a different timeout is desired the following GUC variable can be used to set it in milliseconds:
g

gokatz

06/09/2022, 3:38 AM
Hey , thanks 🙂
I tried this:
Copy code
create extension if not exists http;
SELECT http_set_curlopt("CURLOPT_TIMEOUT_MS", 1000);
but got
column "CURLOPT_TIMEOUT_MS" does not exist
any idea?
g

garyaustin

06/09/2022, 3:42 AM
I don't without digging into the extension. It sounds like it can be done though when I glanced thru the readme and issues.