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?