I'm getting 'server restarted' errors seemingly randomly on long running cron jobs.
Why?
8 Replies
#status might be releated to that, could you share logs?
the log was just that, 'server restarted'
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/cronCron | Supabase Docs
Schedule Recurring Jobs with Cron Syntax in Postgres
How long is it taking for you? I'm guessing that it is not always happening on these jobs, just sporadically?
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
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
well yeah, but the same would apply to an edge function, and I don't see that limitation there
Edge functins have limits also https://supabase.com/docs/guides/functions/limits
Limits | Supabase Docs
Limits applied Edge Functions in Supabase's hosted platform.