Skip to content

Massive memory usage in 1.6.4 #397

@AntonOfTheWoods

Description

@AntonOfTheWoods

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions