# How to avoid upstream timeouts?

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

<div class="post-metadata">

作者： ![trobiyo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trobiyo/32/311872_2.png) [@trobiyo](https://meta.discourse.org/u/trobiyo)\
发布日期： [2019 年2 月 21 日 08:35 UTC](https://meta.discourse.org/t/how-to-avoid-upstream-timeouts/35483/15 "2019-02-21T08:35:06Z")

</div>

> db\_work\_mem: 40MB  
> UNICORN\_WORKERS: 8  
> and with 4 CPUs and 8GB  
> db\_work\_mem: 40MB  
> UNICORN\_WORKERS: 4

Hi @Falco,

If we traspolate those values to use Puma, what is the recommended number of Threads per worker you suggest? In the case we are talking about a site with 1M requests per day.

Cheers,  
Ismael

---

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