# Connection timed out while connecting to upstream on AWS

**URL:** <https://meta.discourse.org/t/connection-timed-out-while-connecting-to-upstream-on-aws/46517>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [Junho 27, 2016, 4:15pm UTC](https://meta.discourse.org/t/connection-timed-out-while-connecting-to-upstream-on-aws/46517 "2016-06-27T16:15:40Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Junho 27, 2016, 8:55pm UTC](https://meta.discourse.org/t/connection-timed-out-while-connecting-to-upstream-on-aws/46517/7 "2016-06-27T20:55:11Z")

</div>

Home on GUJ is /categories right?

A `GET /categories.json` takes 262ms with only 24.2ms on 18 queries (9%) for me.

Your database seen to be **very** bad. People talk shit about RDS but I didn’t know it was that bad.

You can try to `VACUUM VERBOSE ANALYZE` the entire database and see if it works. If you expand the timing and see the slow queries, you can target the slow tables first.

---

_[View the full topic](https://meta.discourse.org/t/connection-timed-out-while-connecting-to-upstream-on-aws/46517)._
