# 502-bad-gateway ajax response

**URL:** https://discourse.roots.io/t/502-bad-gateway-ajax-response/7636
**Category:** trellis
**Created:** 2016-09-14T09:03:03Z
**Posts:** 2

## Post 1 by @chrisk2020 — 2016-09-14T09:03:04Z

I’ve done a bit of digging, but can’t find a solution so far - I’m running into a intermittent 502 bad gateway when using an ajax plugin - ajax load more.

One potential solution I have come across is to increase the php\_max\_execution\_time

So the question is - what could be the root cause of the problem in the first place, and would increasing the php\_max\_execution\_time be the best solution, and if so what would an acceptable setting be?!

The intermittent nature of the issue points to something like a memory issue, but I’d rather make sure it’s not just a sticking plaster to a bigger problem.

---

## Post 2 by @chrisk2020 — 2016-09-14T10:52:58Z

I ended up increasing the fast cgi buffers which resolved the issue.
