# Changing a category background image and saving leads to an Nginx Bad Gateway error

**URL:** <https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099>\
**Category:** Bug\
**Created:** [June 1, 2016, 6:57pm UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099 "2016-06-01T18:57:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![clay](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clay/32/102156_2.png) [@clay](https://meta.discourse.org/u/clay)\
**Post date:** [June 1, 2016, 6:57pm UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099/1 "2016-06-01T18:57:26Z")

</div>

I was just able to reproduce this twice on a new test Discourse site.

1. Edit a category - in this case, the category had a sub category.
2. Go to the Images tab.
3. Change the Category Background Image.
4. Save and wait
5. Discourse “crashes” for ~ 10 seconds and forwards you to an Nginx Bad Gateway error page.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [June 6, 2016, 2:43am UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099/2 "2016-06-06T02:43:56Z")

</div>

Does anything pop up in logs? Are you running latest?

This sounds to me like some query is timing out, we need to figure out what and it is highly dependent on the actual data in the database.

---

<div class="post-metadata">

**Author:** ![clay](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clay/32/102156_2.png) [@clay](https://meta.discourse.org/u/clay)\
**Post date:** [June 6, 2016, 3:09am UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099/3 "2016-06-06T03:09:08Z")

</div>

Nope, nothing pops up in logs. I did this on an almost new vanilla Discourse instance (2GB DO install) with only ~ 5 categories and maybe a few hundred posts. I was able to repeat it multiple times. The only non-standard part of the installation was Let’s Encrypt.

Let me know if I can do anything to provide you with more debug info.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [July 22, 2022, 12:49am UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099/4 "2022-07-22T00:49:43Z")

</div>

Sorry Clay, closing this one off as stale.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [July 24, 2022, 10:00pm UTC](https://meta.discourse.org/t/changing-a-category-background-image-and-saving-leads-to-an-nginx-bad-gateway-error/45099/5 "2022-07-24T22:00:58Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
