I'm getting 'server restarted' errors seemingly randomly on long running cron jobs.

Why?
8 Replies
ibrahim
ibrahim2mo ago
#status might be releated to that, could you share logs?
Eduardo Bellani @ crescent
the log was just that, 'server restarted'
ibrahim
ibrahim2mo ago
For best performance, we recommend no more than 8 Jobs run concurrently. Each Job should run no more than 10 minutes. is what it says in this guide https://supabase.com/docs/guides/cron
Cron | Supabase Docs
Schedule Recurring Jobs with Cron Syntax in Postgres
ibrahim
ibrahim2mo ago
How long is it taking for you? I'm guessing that it is not always happening on these jobs, just sporadically?
Eduardo Bellani @ crescent
it is sporadically yes and I do have around ~10 jobs, but some of them take way more than 10 minutes
For best performance, we recommend no more than 8 Jobs run concurrently. Each Job should run no more than 10 minutes.
What is the rationale for this? I assume # of background workers, for the quantity, but the max time is weird
ibrahim
ibrahim2mo ago
i don't know off the type of my head, i might investigate the pg_cron which supabase uses later to see if it's a limitation of that just in general though, long running processes can consume resources on any system so it makes sense that there are max time limits
Eduardo Bellani @ crescent
well yeah, but the same would apply to an edge function, and I don't see that limitation there
ibrahim
ibrahim2mo ago
Limits | Supabase Docs
Limits applied Edge Functions in Supabase's hosted platform.

Did you find this page helpful?