Follow us on Facebook and Twitter!

504 Gateway Time-out
#1
I keep getting this on pages with commentics - with a whited out page as the result.

The log files say this:

[Fri Nov 22 21:55:28 2013] [error] [client xxx.xxx] Premature end of script headers: php54-cgi
[Fri Nov 22 21:55:35 2013] [warn] [client xxx.xxx] mod_fcgid: read data timeout in 60 seconds

The only other errors are:

Code:
[Fri Nov 22 21:56:43 2013] [warn] [client xxx.xxx] mod_fcgid: stderr: PHP Notice:  Constant IN_COMMENTICS already defined in /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/index.php on line 220

That was because I wanted to call in 'most recent comments' in a sidebar before adding the input form in the main page, so needed it, I can remove it now and test if the site didn't 504 on me all the time.

Would this on its own cause the 504?

Thanks
Reply
#2
Hi,

For the "read data timeout in 61 seconds", are you using any of the integration keywords like 'cmtx_title' or 'cmtx_h1'? There's a bug with Commentics v2.4, which is fixed is my development version, where the keyword conversion can lead to an endless loop.

For the "Premature end of script headers", try the following FAQ for the pages that you're including Commentics on:
http://www.commentics.org/support/knowle...article=30

I would be surprised if the "Constant IN_COMMENTICS already defined" error has anything to do with it. To fix that, in the integration code where you're including Commentics, change this:

PHP Code:
define('IN_COMMENTICS'true); //no need to edit this line 

to this:

PHP Code:
if (!defined('IN_COMMENTICS')) { define('IN_COMMENTICS'true); } //no need to edit this line 

If I had to guess, it's because of the keyword conversion.
Have you completed the interview?
Reply
#3
Hmmmm, thanks Steven!

I just checked, I'm not using any integration keywords so not that, and it's always the first thing so not that either. Could leave the third - I've removed the duplicates and I'll do a global search and replace at some point in the future when I can work up the nerve Smile

My hunch is it's a database problem - they always fob me off in other directions (ie go fix your script, go optimise the page) but the database this is running on does seem to be the root cause

Running like a dream again now though
Reply
#4
Ok, slight update. The technical team at the hosting has gotten back to me about this stuff:

Code:
[Fri Nov 22 21:55:28 2013] [error] [client xxx.xxx] Premature end of script headers: php54-cgi
[Fri Nov 22 21:55:35 2013] [warn] [client xxx.xxx] mod_fcgid: read data timeout in 60 seconds

They're telling me that the database commentics is on might be overcrowded, so to use another. And if it still happens there, it's the script's fault.

system() isn't enabled on this server so I can't do backups, but Steven would you be able to point me to some MySQL help pages which would point me to the right tools and methods to be able to export a database and reimport it somewhere else? I don't want to lose my mighty 59 comments!!

Thank you
Reply
#5
Fwiw, this killed off 95% of my traffic in the last 12 hrs, it's only just now been resolved.
Can I ask is this error in the commentics site logs?
Really need to establish if this is host or script
Reply
#6
Seems to have fixed itself. No clue what causes it yet though
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)