Very likely, if for any reason a search takes longer than 30 seconds you will see this kind of timeout. The web worker gets killed and NGINX sends a 502.
- How many topics/posts are there on your forum?
- What are the specs of your server?
- If this is an import it may make sense to run a full vacuum VACUUM FULL - PostgreSQL wiki
./launcher enter app
and thensudo -u postgres psql discourse
…