# Too many connections to DB, how to optimize

**URL:** <https://meta.discourse.org/t/too-many-connections-to-db-how-to-optimize/66395>\
**Category:** Support\
**Created:** [18 Luglio 2017, 3:40pm UTC](https://meta.discourse.org/t/too-many-connections-to-db-how-to-optimize/66395 "2017-07-18T15:40:01Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![TomekB](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomekb/32/66593_2.png) [@TomekB](https://meta.discourse.org/u/TomekB)\
**Post date:** [18 Luglio 2017, 5:52pm UTC](https://meta.discourse.org/t/too-many-connections-to-db-how-to-optimize/66395/10 "2017-07-18T17:52:02Z")

</div>

How do you rotate connections with pgbouncer (session pooling, transaction pooling)?  
I will try to debug these stalled connections but I think most of them were idle.

---

_[View the full topic](https://meta.discourse.org/t/too-many-connections-to-db-how-to-optimize/66395)._
