active sessions #428
-
Hi, I have now 2 workers. I initiated 10 multiple chains using self destruction and job_max_instances = 1. Thanks in advance! Regards, UPDATE: when I launced the next 10 chains, the active sessions were gone from pg_stat_activity. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
Hi, assuming when we are speaking about 2 workers we are talking about 2 Each In the worst scenario (highest load) we need:
That means the max connection (session) number for one
In other words, if you want to limit the number of the database sessions you should decrease the
I hope I explained clearly enough. :-) |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying to utilize pgtimetable on a semi-loaded vanilla postgres. I have 65 procedures running independent from one another and in addition to this I have only 3 chains running 2 procedures each chain (need to honor some dependency). My server have some 16 CPUs and 96GB of RAM. What I observe is as if my procedures keep piling up. I only have around 50 to 60 active sessions when I query the active_session table and whenever I check pg_stat_activity there is only 1 instance of a session form pgtimetable. My goal is to run all these 65 procs on a minute basis (each proc takes between 5 and 15 seconds to finish). But I seem to wait for workers to free up to pick up the next run. Max current workers is set to 900, session keep staying between 50 and 60. Would you mind helping me orientate in the given situation ? |
Beta Was this translation helpful? Give feedback.
Hi,
assuming when we are speaking about 2 workers we are talking about 2
pg_timetable
instances.Each
pg_timetable
instance can use max--cron-workers + --interval-workers
parallel routines according to the manual.In the worst scenario (highest load) we need:
Scheduler.retrieveChainsAndRun()
,Scheduler.retrieveIntervalChainsAndRun()
LogHook.send()
.That means the max connection (session) number for one
pg_timetable
instance (worker) would be:In other words, if you want to limit the number of the database sessions you …