My postgresql instance keeps throwing this error and it temporarily goes away after I restart the database.
Here's the logs:
ERROR: parallel worker failed to initialize
2025-02-25 21:00:51.586 UTC [668] HINT: More details may be available in the server log.
2025-02-25 21:00:51.586 UTC [668] STATEMENT: ...some sql query
2025-02-25 21:00:51.663 UTC [5] LOG: could not fork worker process: Resource temporarily
Here's my configuration:
shared_buffers = '8GB'
work_mem = '512MB'
maintenance_work_mem = '2GB'
effective_cache_size = '16GB'
max_parallel_workers_per_gather = 8
max_parallel_workers = 32
autovacuum_work_mem = '1GB'
vacuum_cost_limit = 1000
autovacuum = on
I have 32GB ram, 32vCPU, and 10GB storage. I've tried tweaking these settings up but no hope. Is there something I am getting wrong here?