# How to avoid upstream timeouts?

**URL:** <https://meta.discourse.org/t/how-to-avoid-upstream-timeouts/35483>\
**Category:** Support\
**Created:** [Novembro 12, 2015, 5:17am UTC](https://meta.discourse.org/t/how-to-avoid-upstream-timeouts/35483 "2015-11-12T05:17:57Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [Setembro 15, 2017, 5:43pm UTC](https://meta.discourse.org/t/how-to-avoid-upstream-timeouts/35483/13 "2017-09-15T17:43:34Z")

</div>

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?

---

_[View the full topic](https://meta.discourse.org/t/how-to-avoid-upstream-timeouts/35483)._
