citusdata / citusdata/pg_cron

Massive memory usage in 1.6.4

Open
#397 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.9k
Forks
260
Avg merge
5d 5h
Merged PRs (30d)
1

Description

I've seen the other issues that say they are fixed. However, I am getting gigabytes of RAM taken after a couple of days with a `1.6.4` running for more than a couple of days. I have 3 jobs running every 5s and 3 every 30s (+ a few others every lots of minutes). If I don't regularly `SELECT pg_terminate_backend(pid) from pg_stat_activity where application_name ilike 'pg_cron scheduler';` I simply run out of memory on my db server... Not ideal.

Is this kind of usage simply not supported? How might I see where the issue is?

```
supabase=# SELECT name, setting FROM pg_settings WHERE name LIKE 'cron.%';
name | setting
-----------------------------+-----------
cron.database_name | supabase
cron.enable_superuser_jobs | on
cron.host | localhost
cron.launch_active_jobs | on
cron.log_min_messages | warning
cron.log_run | on
cron.log_statement | on
cron.max_running_jobs | 32
cron.timezone | GMT
cron.use_background_workers | off
```

I *guess* I could just do a daily/bi-daily `pg_terminate`. Am I wrong to think that's nasty?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.