# Can't update privacy policy page 502 bad gateway

**URL:** https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170
**Category:** Support
**Created:** [28.Декабрь.2018 02:12:44 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170 "2018-12-28T02:12:44Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![voogarix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/voogarix/32/148089_2.png) [@voogarix](https://meta.discourse.org/u/voogarix)
#### Post date: [28.Декабрь.2018 02:12:45 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/1 "2018-12-28T02:12:45Z")

</div>

Hi. I alreade translated privacy-policy page to my language but i can’t save changes. When i press save it thinks too long and ater gives 502 Bad Gateway error. Refreshed page, changed post owner from system to myself but doesn’t help. Any idea?

 ![502%20bad%20gateway](https://global.discourse-cdn.com/meta/original/3X/d/0/d0cdba018b1df0e6542fe302d2bd4f2640b78f14.png)

---

<div class="post-metadata">

### Author: ![voogarix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/voogarix/32/148089_2.png) [@voogarix](https://meta.discourse.org/u/voogarix)
#### Post date: [28.Декабрь.2018 02:26:13 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/2 "2018-12-28T02:26:13Z")

</div>

Somehow figured out - but i think it is not a solution. Bulk removing old texts and adding translated texts doesn’t work, however it is possible replace 3-5 lines with new texts and save… strange

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [14.Февраль.2019 07:09:05 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/3 "2019-02-14T07:09:05Z")

</div>

I have the same problem, when I want to replace whole FAQ/Guidelines document with new content. Was able to publish with your workaround. Thanks, but still hope this get fixed.

---

<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: [15.Февраль.2019 00:33:51 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/4 "2019-02-15T00:33:51Z")

</div>

@gerhard can you add to your list investigating this?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [05.Март.2019 14:54:22 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/5 "2019-03-05T14:54:22Z")

</div>

I can’t reproduce the problem, but I suspect that the diff calculation might cause problems in some circumstances when lots of text is changed.

@Lure Could you take a look at `/logs` and see if you still can find the error. The full error message and the backtrace would be really helpful.

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [06.Март.2019 09:30:03 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/6 "2019-03-06T09:30:03Z")

</div>

Gerhard, have found this error repeating 4 times at that day, so this may be it:

```
Error: Syntax error, unrecognized expression: #_=_
at Function.t.error (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:1:27776)
at t.tokenize (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:2:1917)
at t.select (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:2:2182)
at Function.t [as find] (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:1:17048)
at we.fn.init.find (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:2:4467)
at new we.fn.init (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:2:4964)
at we (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:1:13480)
at https://pojalabanda.com/assets/application-00f63f7f8420595a9520352fbdd7afb384c4d2c2ef0cfc0f465e41ff59223e4f.js:8:5104
at e.invoke (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:9:11624)
at e.flush (https://pojalabanda.com/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:9:10577)

```

BTW, I have noticed many errors reported on logs (was not checking this before regularly) - how should I treat them - as bugs and report them here?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [06.Март.2019 14:58:33 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/7 "2019-03-06T14:58:33Z")

</div>

Unfortunately that’s an unrelated client side error. Is there anything else in the logs from that date? Try to use the filter to find the errors.  
 ![image](https://global.discourse-cdn.com/meta/original/3X/7/e/7ebb9bb955d2548618c8be001bbbc6b94d8819ec.png)

It’s usually good practice to keep an eye on the error log, but unless you noticed a problem during usage and know how to reproduce the problem, posting random errors usually doesn’t help us much. Mind, we always keep an eye on the error logs of our customers and fix bugs we discover that way on a regular basis.

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [06.Март.2019 15:04:03 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/8 "2019-03-06T15:04:03Z")

</div>

Interesting, that there is no other error message, as I can reproduce this pretty easily by just replacing old and new text of guidelines on test topic.  
Are there any other logs that I should check?

Edit: I am using text from [here](https://docs.google.com/document/d/1HzNx8jF9OfICoIQ3juVYJ_lJLId6sxP3T9nlFSoNB4M/edit?usp=sharing) - I just copy the first Slovenian (non-formated) as-is into editor and save. Then edit and copy English (copy as formated) and save and it fails with 502.

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [06.Март.2019 18:25:46 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/9 "2019-03-06T18:25:46Z")

</div>

Tried to reproduce it on [try.](https://try.discourse.org/t/test-huge-post-with-edit/1336) but I could not. It seems it is something in my config, that breaks this… ☹

---

<div class="post-metadata">

### Author: ![keith1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keith1/32/178982_2.png) [@keith1](https://meta.discourse.org/u/keith1)
#### Post date: [09.Март.2019 23:57:39 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/10 "2019-03-09T23:57:39Z")

</div>

I’m attempting to update my terms of service on my site to this new template:

> [@Updated Terms of Service Template](https://meta.discourse.org/t/updated-terms-of-service-template/103384):
>
> As mentioned in the [Discourse 2.2.0.beta5 Release Notes](https://meta.discourse.org/t/discourse-2-2-0-beta5-release-notes/103097), we’ve updated the default Terms of Service template that ships with Discourse. The terms have been completely rewritten, though they are fairly similar in substance to the previous terms adapted from Automattic (Wordpress). It should be noted that if you modified the default terms in any way, they will not automatically be replaced with these new terms. The new terms are included below in both formatted and raw forms for your convenience.…

However, when I save my edit, the status says “saving” for about a minute before prompting me with a 502 error.

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/c/ccc9901fc1c3ddfcb6f0bf7c82df89b4c5e12461.png)

This is obviously a rather large post, but I can’t reproduce the issue on any of my other topics. Can anyone think of another clue to figure out what’s causing this? I’d really like to update the TOS 😉

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [10.Март.2019 11:24:11 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/11 "2019-03-10T11:24:11Z")

</div>

@keith1 I’m having a hard time reproducing this problem. Do you see a related error in `/logs`? Or maybe an error in the Javascript console of your browser (press F12)?

Also, since I suspect that this might be performance related: Are you running this on a DigitalOcean droplet? Which kind?

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [10.Март.2019 11:49:50 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/12 "2019-03-10T11:49:50Z")

</div>

@gerhard for reference, I am running on [Hetzner CX11](https://www.hetzner.com/cloud?country=us):  
1 vCPU  
2 GB RAM  
20 GB SSD

---

<div class="post-metadata">

### Author: ![keith1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keith1/32/178982_2.png) [@keith1](https://meta.discourse.org/u/keith1)
#### Post date: [11.Март.2019 06:07:35 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/13 "2019-03-11T06:07:35Z")

</div>

Thanks for the reply @gerhard. Unfortunately, no related errors in /logs or in my browser ☹ You’re correct, I am running the site on digitalocean on a 4gb/60gb droplet. (Oh woah you just made me realize I can get a free upgrade with their new pricing plan).

I was able to get around the issue by deleting the old terms of service and pressing save - once that submit went through, I was able to edit once again, paste the new TOS in, and successfully save.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [12.Март.2019 18:05:54 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/14 "2019-03-12T18:05:54Z")

</div>

I had no luck reproducing the issue on a droplet (1 vCPUs, 2GB). It takes only 65ms.

Are you using any plugins that could slow down the updating so much or are you using a reverse proxy that might cause an issue?

---

<div class="post-metadata">

### Author: ![Lure](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lure/32/130462_2.png) [@Lure](https://meta.discourse.org/u/Lure)
#### Post date: [12.Март.2019 21:00:32 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/15 "2019-03-12T21:00:32Z")

</div>

I use following plugins:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/5/25edd7bee99cfe7b0e62ee1e39e1f971590d62eb.png)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [28.Апрель.2022 07:19:40 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/16 "2022-04-28T07:19:40Z")

</div>



---

<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: [28.Апрель.2022 10:30:22 UTC](https://meta.discourse.org/t/cant-update-privacy-policy-page-502-bad-gateway/105170/17 "2022-04-28T10:30:22Z")

</div>


