# Search 502 errors in 2.5.0.beta6

**URL:** https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050
**Category:** Self-hosting
**Created:** [June 6, 2020, 10:49pm UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050 "2020-06-06T22:49:24Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ravenzachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravenzachary/32/163227_2.png) [@ravenzachary](https://meta.discourse.org/u/ravenzachary)
#### Post date: [June 6, 2020, 10:49pm UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/1 "2020-06-06T22:49:24Z")

</div>

I just upgraded to 2.5.0.beta6. After the successful upgrade completed, all searches fail resulting in the following message after an extended period of think time (animating circle):

 ![Screen Shot 2020-06-06 at 15.51.08](https://global.discourse-cdn.com/meta/original/3X/4/b/4bddb84f2a89a8c5ee64cc3182adc17995c428ea.png)

 ![Screen Shot 2020-06-06 at 15.43.32](https://global.discourse-cdn.com/meta/original/3X/7/8/78624fff6f46b4a9a156cc3c0613418e22e58fe0.png)

I have tried rebooting the server, and this does not resolve the issue.

Any insight? Thank you.

UPDATE 1: I am currently regenerating the search index. I have no idea if this will help.

UPDATE 2: rake search:reindex did not fix the 502 error issue.

UPDATE 3: Sometimes instead of getting a 502 error, I get the message, “Site is under extreme load, search is disabled, try again later.” This message has never appeared before. This is not a high-use Forums.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 7, 2020, 12:10am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/3 "2020-06-07T00:10:38Z")

</div>

If the database was upgraded to Postgres 12 it might take time for things to stabilize?

---

<div class="post-metadata">

### Author: ![ravenzachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravenzachary/32/163227_2.png) [@ravenzachary](https://meta.discourse.org/u/ravenzachary)
#### Post date: [June 7, 2020, 12:26am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/4 "2020-06-07T00:26:47Z")

</div>

Does the latest docker image use PostgreSQL 12 and @codinghorror how do you define “take time”? Should I let it be to resolve itself or do I need to fix something?

UPDATE: Yes, PostgeSQL 12.

---

<div class="post-metadata">

### Author: ![ravenzachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravenzachary/32/163227_2.png) [@ravenzachary](https://meta.discourse.org/u/ravenzachary)
#### Post date: [June 7, 2020, 12:33am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/5 "2020-06-07T00:33:22Z")

</div>

Ok, I went and read this:

> [@PostgreSQL 12 update](https://meta.discourse.org/t/postgresql-12-update/151236):
>
> warning WARNING! If your database is very large, you will need a lot of extra disk space (2x database size) and should be very careful with this upgrade! We just landed the long waited PostgreSQL major version upgrade. Any site admins rebuilding Discourse from the command line will be upgraded to PostgreSQL 12 from the old PostgreSQL 10. We are running this new version for a while on Meta, and everything is working fine. PostgreSQL 12 brings lots of improvements that will be automatical…

I received the following message, so I assume the upgrade to PostreSQL 12 worked for me:

_Upgrade Complete_

_To complete the upgrade, rebuild again using:_

_./launcher rebuild app_

I am curious if this search bug will fix itself or if I need to do something.

---

<div class="post-metadata">

### Author: ![ravenzachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravenzachary/32/163227_2.png) [@ravenzachary](https://meta.discourse.org/u/ravenzachary)
#### Post date: [June 7, 2020, 4:08am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/6 "2020-06-07T04:08:13Z")

</div>

Ok, search is working again on 2.5.0b6, but it’s really slow compared to 2.5.0b3.

Any advice?

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [June 7, 2020, 7:42am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/7 "2020-06-07T07:42:02Z")

</div>

Hello @ravenzachary

You might consider checking the integrity of your PostgreSQL indexes and making sure they are working properly and not corrupted.

---

<div class="post-metadata">

### Author: ![ravenzachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravenzachary/32/163227_2.png) [@ravenzachary](https://meta.discourse.org/u/ravenzachary)
#### Post date: [June 11, 2020, 6:07am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/8 "2020-06-11T06:07:17Z")

</div>

Thank you. What commands would I use for that?

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [June 11, 2020, 6:22am UTC](https://meta.discourse.org/t/search-502-errors-in-2-5-0-beta6/154050/9 "2020-06-11T06:22:47Z")

</div>

Here ya go @ravenzachary

> [@Use amcheck to Check PostgreSQL Index Integrity (Corruption)](https://meta.discourse.org/t/how-to-use-amcheck-to-check-postgresql-index-integrity-corruption/153207):
>
> Lately, I have read a number of Discourse topics on meta about “index corruption” in both PostgreSQL 10 and 12. One of the take-a-ways from these discussions is that it may be important or interesting for some sys admins to check the integrity of their Discourse PostgreSQL 10 indexes if they are experiencing performance problems or perhaps before performing an upgrade to PostgreSQL 12. For those who might want to perform this check, I have tested amcheck on two differernt Discourse (PostgreSQ…
