How to avoid upstream timeouts?

You’re back!

OK, I get that I’m wrong. Is this more on target?

so with 8CPUs and 12GB
db_work_mem: 40MB
UNICORN_WORKERS: 8

and with 4 CPUs and 8GB
db_work_mem: 40MB
UNICORN_WORKERS: 4

And then I think also involved is the size of the database itself, which we want to be able to get buffered. With a huge database (say postgres_data is 8GB of disk space and there’s 8GB of ram), you might want to reduce the memory for the unicorn workers?