Page 1 of 1

504 Gateway timeout error

Posted: Wed May 15, 2019 7:35 pm
by mozmck
Hi All, I just had a similar problem as mentioned in this post: viewtopic.php?t=2303876
and I fixed it in the same manner. I was running phpbb 3.2.5, and the only extension I have is activation justification. I had not made any changes to the installation in a while, but it started giving the 504 timeout whenever anyone tried to post. It worked fine in the morning (a couple of days ago), and then did not work that evening.

I tried upgrading to the latest 3.2.7, and a number of thing and nothing helped. I finally did as the guy in the post above and it worked: I dumped the current database except for the config and config_text tables, and created a new phpbb install with database and then recovered the data from my backup. After this all the posts they were attempted but recieved 504 errors appeared, but the post counts were wrong. I was able to fix that with the tools in ACP and everything looks fine now.

Has anyone else seen something like this? Is there an easier way to fix this problem or anything known about what might cause it?

Thanks,
Moses

Re: 504 Gateway timeout error

Posted: Wed May 15, 2019 8:31 pm
by david63
Gateway errors are server problems and re-creating a database is not the solution. Whenever you get a Gateway error then you need to speak with your hosts as the problem is with them - not phpBB, not any other software package

Re: 504 Gateway timeout error

Posted: Wed May 15, 2019 9:11 pm
by mozmck
I'm sorry but that does not appear to be correct. I checked with my host, and they increased the php timeout from 120 seconds to 300, and that did not help. The posting.php script was timing out when trying to submit a post - but everything else on the site and board worked just fine. If you read the post I referenced he had the problem every time he copied the config table over - but not if he did not copy it.
Because of that I did not try copying the config table, but creating the new setup and copying everything else fixed the problem with no other changes on the server.

Re: 504 Gateway timeout error

Posted: Thu May 16, 2019 6:10 pm
by </Solidjeuh>
It's' a server issue, not database or phpBB.

Causes of 504 Gateway Timeout Errors
Most of the time, a 504 Gateway Timeout error means that whatever other server is taking so long that it's "timing out," is probably down or not working properly.

The 504 Gateway Timeout error is an HTTP status code that means that one server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser.

https://www.lifewire.com/504-gateway-ti ... ed-2622941

Re: 504 Gateway timeout error

Posted: Thu May 16, 2019 8:53 pm
by david63
mozmck wrote: Wed May 15, 2019 9:11 pm I checked with my host, and they increased the php timeout from 120 seconds to 300
If your host believes that increasing the PHP timeout value will resolve a Gateway timeout then it is time to find a new host that knows how to configure a server.

Re: 504 Gateway timeout error

Posted: Fri May 17, 2019 4:21 pm
by mozmck
Ok, well I'm sure I'm ignorant on many details, and I don't want to say y'all are wrong, but I would like to understand this a little better. Wouldn't a script that takes a long time to do something give the same error? Let's say I just made it sleep for 300 seconds before responding? My thought was that maybe there was some config problem cause the script to basically hang.

The host is siteground and we are on shared hosting, and they indicated that a script that takes longer than their php timeout limits will cause the 504 timeout error. I did definitely get a lot longer before the timeout when they increased the php timeout.

Thanks in advance for any info!

Re: 504 Gateway timeout error

Posted: Fri May 17, 2019 4:38 pm
by Lumpy Burgertushie
I seem to remember that a few years ago this was quite often a problem on windows based servers. Is your hosting on a windows server?


robert

Re: 504 Gateway timeout error

Posted: Fri May 17, 2019 4:47 pm
by mozmck
No, the host is SiteGround and it is linux.