Hi all,
After successfully deploying my Rails application, specific GraphQL queries are returning 500 errors (most queries succeed).
I have a shared-cpu-1x VM, running 2 web processes and 1 worker process.
Both web and worker are scaled to use 1gb memory.
The most expensive query returns a http 500 response:
Server logs:
Full error:
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
RAILS_MAX_THREADS is set to 10 and WEB_CONCURRENCY to 2, which means each process should have 20 connections (unless I’m misunderstanding what processes are).
“postmaster” clearly indicates some interaction with Postgres, but I’m struggling to find any logs (where are the postgres logs? var/log/postgres is empty) to tell me exactly what the issue is. Any help is greatly appreciated.
My database is a shared-cpu-1x
with 1gb memory, average memory usage is 405mb/1gb
Here’s what postgres.conf looks like: