Edit not error 538 but 524 (A timeout occurred) from Cloudflare.
504 when I disable Cloudflare.
Your back end server is having problems if you’re getting 504s with CloudFlare off.
So I’ve been digging more into it, but unfortunately I haven’t found a solution, so I may just switch to disqus for comment as at least it won’t affect users.
Here’s what I know:
* Comments and posts get posted immediately. So while the page is waiting for about 120 seconds before completion, if I open a new tab in my browser I can see the post and comment there.
* php5-fpm.log shows messages like:
[0[08-Dec-2013 10:59:30] WARNING: [pool www] child 2420, script ‘/srv/www/cnx-software.com/public_html/wp-comments-post.php’ (request: “POST /wp-comments-post.php”) execution timed out (148.256482 sec), terminating
* It happens for both logged-in users and visitors
* I’ve added some debug log, and found out it get stuck in do_action in wp-include/plugin.php.
do_action gets called all the time in wordpress, so I don’t know how to get meaningful log at this point. I’d assume it gets stuck in the for loop in the function (TBC).
So after many hours, I finally found the culprit, although not the exact reason.
I disabled BackWPup plugin (http://wordpress.org/plugins/backwpup/), and comments work fine again.
cnxsoft, when you disable it, how do you backup?
Asksing as I’m having similar problems but would hate not having automatical backups taken.
After checking more… It’s probably not BackWPUp. http://wordpress.org/support/topic/backwpup-make-commenting-and-posting-timeout-on-my-server?replies=4
I could mitigate the problem somehow by changing the cache plugin, and running mysqltuner, but the thing that really did the trick was when Linode (my hosting provider) told me there was an hardware problem, and moved my site to another machine…
I got that kind of CPU usage before being moved to another serer: https://plus.google.com/110719562692786994119/posts/Ps95NH9tBrW
Thank you for your reply.
I’ll go talk to my provider.