Lost Connection on new post of the main website in WPMU

I have tried the Wordpress forums to no avail. It continues to be a rather big problem, so I am hoping someone might have a thought here.

My main website (geekazine.com) has a big problem when I post a new article to it. The Edit page will eventually say "Connection Lost with host". I can't do anything with the new post until it comes back. If I try to save the post, sometimes it will bring the whole system down - either getting a 503 or 500 error.

Here is the kicker: All other child sites not only run and post perfect, they continue to work even though this post comes back with errors.

I have had this issue for a few months now. Disabled all plugins and cleared the cache. Flushed and changed the Theme. I have played with .htaccess and wp-config.php multiple times. Everything is back to Network suggested settings.

Someone suggested MySQL might be crashing, so I went into the DB to find anything that could do something like that. I have yet to find what it could be.

So I am at a complete loss. How is it the main site can crash, and the other child WP sites continue on without problem?

  • Michael Bissett

    Hey @jeffrey_powers, hope you're doing well today! :slight_smile:

    It's definitely curious that you're running into this only on your main site... hmm.

    Have you had a look at your site's error log here? Could you post the more recent results to the thread here? (around the time where you were having an issue posting an article)

    Also, how much memory is allocated to your Multisite? Have you tried inserting this define into your site's wp-config.php:

    define( 'WP_MEMORY_LIMIT', '512M' );

    What changed on your site around the time that this started showing up? Was it when you upgraded to a particular version of WordPress?

    Please advise,
    Michael

  • jeffrey_powers

    I believe a Wordpress update when it all went south, but not sure. Error log talks about the FastCGI timing out or erroring out. Error logs not on at this point, so I would have to enable for a day.

    I got this in wp-config. The memory was at 96M until this morning.

    define ('WPLANG', '');
    define('WP_POST_REVISIONS', 3);
    define('WP_MEMORY_LIMIT', '256M');
    define( 'EMPTY_TRASH_DAYS', 15 ); // 30 days
    define( 'WP_ALLOW_REPAIR', true );
    define( 'WP_HTTP_BLOCK_EXTERNAL', false );
    define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com' );
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    /*$base = '/';*/
    define('DOMAIN_CURRENT_SITE', 'www.geekazine.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define( 'NOBLOGREDIRECT', 'http://www.geekazine.com' );
    /** WordPress absolute path to the Wordpress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    /* Sunrise for Domain Mapping */
    define( 'SUNRISE', 'on' );
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    /** Autosave */
    define( 'AUTOSAVE_INTERVAL', 1800 ); // Seconds
  • jeffrey_powers

    Here is part of it:

    [Thu May 07 06:36:30 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:32974] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:38:19 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:35898] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:41:29 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 104.183.93.4:53778] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:45:02 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:51326] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:45:02 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:51370] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:53:14 2015] [5358206] [core:error] [client 46.119.123.165:53471] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer {URL}/admin/FCKeditor/editor/filemanager/upload/php/upload.php
    [Thu May 07 06:53:15 2015] [5358206] [core:error] [client 46.119.123.165:53812] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer {URL]/admin/FCKeditor/editor/filemanager/upload/php/upload.phpindex.php
    [Thu May 07 06:53:41 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:41719] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:54:51 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:45287] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 06:57:38 2015] [5358206] [fcgid:warn] (104)Connection reset by peer: [client 66.249.93.167:52467] mod_fcgid: error reading data from FastCGI server, referer {webpage}
    [Thu May 07 06:57:38 2015] [5358206] [core:error] [client 66.249.93.167:52467] End of script output before headers: index.php, referer {webpage}
    [Thu May 07 07:01:45 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:34943] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Thu May 07 07:01:48 2015] [5358206] [fcgid:warn] (32)Broken pipe: [client 97.107.141.176:35087] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
  • Michael Bissett

    Hey @jeffrey_powers,

    Hmm... seems like you've had "fun" with this site in prior days:

    https://wordpress.org/support/topic/multi-site-problem-after-server-move

    I take it the WordPress.org thread you opened previously was this one?

    https://wordpress.org/support/topic/connection-lost-in-new-post-or-editing-save-option-might-be-the-issue

    I see that Mika suggested upgrading to WordPress 4.2, but as I see you're running that now, and you're still running into this, that didn't do the trick.

    I'm curious as to whether any of the entries in your posted log above were from around the time were you tried posting to your site... but I'm also curious as to whether your hosting's the primary problem. Still, I find it odd that this only happens on the main site...

    Going upon that WordPress.org thread, you've been dealing with this for over 2 months now, which makes me wonder... what changed on your site around that time? It's a ways back to recall, I know, but something's all whackanoodles in your site, and I'd really like to try to narrow down the cause of this would be.

    On another note, not sure if GoDaddy provides the ability to change this, but I'd want to try switching from FastCGI to another system, perhaps even trying to change the version of PHP. I know that you changed the version of PHP, but I'm not certain that they'll allow you to switch from FastCGI to something else, might not be in your hosting package.

    Of course, it may be profitable in the end to switch to a different provider, if you're so inclined. Some of the hosts mentioned here on the forums by members would be:

    - Site5
    - Surpass Hosting
    - WP Engine
    - Digital Ocean

    Kind Regards,
    Michael

  • jeffrey_powers

    Yes. It has been going on for a couple months. At one point things calmed down, but came right back in.

    Geekazine has been around since 2007. This site has gone through many upgrades and plugins. I've kept it as clean as possible. Geekazine did switch to MU about 2 years ago.

    I have been seriously thinking about exporting the other sites, then turn this into a standalone site again. See if the problem comes back.

    I am not going to switch hosts. I don't think Godaddy uses another system unless I get a dedicated server and can configure on my own.

    I remember a WP update at the time the problem occurred.

  • Michael Bissett

    Hey @jeffrey_powers,

    Should I turn off MU and see if the problem continues?

    You can give that a try, things being where they are right now. But before you do:

    I have been seriously thinking about exporting the other sites, then turn this into a standalone site again. See if the problem comes back.

    That's definitely something to consider, but in looking at this again, I'm curious about your wp-config.php up in this post:

    https://premium.wpmudev.org/forums/topic/lost-connection-on-new-post-of-the-main-website-in-wpmu#post-874752

    I know you said that you worked with your wp-config.php several times, but trimming out a few bits here, have you tried laying it out like this:

    define ('WPLANG', '');
    define('WP_MEMORY_LIMIT', '256M');
    
    /* Sunrise for Domain Mapping */
    define( 'SUNRISE', 'on' );
    
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'www.geekazine.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define( 'NOBLOGREDIRECT', 'http://www.geekazine.com' );
    
    /** Autosave */
    define( 'AUTOSAVE_INTERVAL', 1800 ); // Seconds
    
    /** WordPress absolute path to the Wordpress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    If it doesn't, then as a suggestion for your converting your Multisite into several single site installs, you may wish to use this to help manage them:

    https://managewp.com/

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • jeffrey_powers

    Nope. Still crashes.

    [Mon May 11 09:42:27 2015] [5358206] [fcgid:warn] [client [ip]:56562] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi
    [Mon May 11 09:42:37 2015] [5358206] [fcgid:warn] [client [ip]:60568] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi
    [Mon May 11 09:42:40 2015] [5358206] [fcgid:warn] (104)Connection reset by peer: [client [ip]:59147] mod_fcgid: error reading data from FastCGI server
    [Mon May 11 09:42:40 2015] [5358206] [fcgid:warn] (104)Connection reset by peer: [client [ip]:59147] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Mon May 11 09:42:40 2015] [5358206] [fcgid:warn] (104)Connection reset by peer: [client [ip]:37381] mod_fcgid: error reading data from FastCGI server
    [Mon May 11 09:42:40 2015] [5358206] [fcgid:warn] (104)Connection reset by peer: [client [ip]:37381] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
    [Mon May 11 09:42:45 2015] [5358206] [fcgid:warn] [client [ip]:53542] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi, referer http://www.url?post=29908&action=edit
    [Mon May 11 09:42:46 2015] [5358206] [fcgid:warn] [client [ip]:53543] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi, referer http://www.url?post=29908&action=edit

    Going to try and turn off MU for a few minutes and see what happens.

  • Michael Bissett

    Hey @jeffrey_powers,

    Rats, was hoping that the wp-config.php trick would've worked. I'm curious about these two entries in your log:

    [Mon May 11 09:42:45 2015] [5358206] [fcgid:warn] [client [ip]:53542] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi, referer http://www.url?post=29908&action=edit
    [Mon May 11 09:42:46 2015] [5358206] [fcgid:warn] [client [ip]:53543] mod_fcgid: can't apply process slot for /web/cgi-bin/php-fcgi, referer http://www.url?post=29908&action=edit

    The URL structure there is... odd, to say the least. :disappointed:

    Are there any other entries in your log file like that? And what happened when you tried turning off MU temporarily?

    I have to wonder if there's something inside your database that might be at fault here, but I also have to wonder if perhaps a re-install might be advisable here.

    If you'd like me to have a deeper look at this here, could you please send in the following via our secure contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress network admin access details (login address, username & password)
    - Include cPanel log-in details (login address, username & password)
    - Include any relevant URLs for your site

    On the contact form (linked to below), please select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanks! :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @jeffrey_powers,

    ...that's odd, removing the relevant defines in my test Multisite's wp-config.php, and reverting the .htaccess to stock for a single site doesn't give me all of that, the only thing that comes up is that I have to log back in again to the site (which would seem to be normal). No database connection errors here.

    I'm thinking more & more now that a re-install of the main site would be advisable here (wipe out the present install, and then re-install with a fresh copy of WordPress), since you mentioned moving the subsites into their own installs. Sometimes starting clean is the best route, no hidden gunk to deal with then.

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @jeffrey_powers,

    The database is about the only thing left here, perhaps something in it got messed up when that WordPress update took place? That's where I'm thinking that a re-install might be more advisable (though I would first want to try exporting the content of your main site into a test site, and seeing if the import goes well, in that there aren't any missing posts).

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @jeffrey_powers,

    My apologies if you were waiting on further feedback from me prior to your post this evening, it didn't seem like you were asking for a response before. :slight_frown:

    Like I mentioned previously, your site's database is still what I'm curious about... though the fact that turning off the Multisite functionality gets this working again is curious.

    Without doing a fair amount of digging into this though (which may very well be something for our second level support staff), it seems like moving your subsites over to the new Multisite network would be the only other option available (aside from doing a full blown re-install of your present Multisite).

    How would you like to proceed here? :slight_smile:

    Please advise,
    Michael

  • Hoang Ngo

    Hi @jeffrey_powers,

    I hope you are well today.

    I've checked your errors log, most of them saying the FastCGI process pool is exhausted, a request is taking longer than expected, this perhaps is a performance issue.

    The reason for this is very various. As you know, some plugins can schedule a cron to run, somehow, the cron process is expensive and costs a lot of server resources, or a plugin trying to hook and running a function on the post edit page, and that can causing this issue. Or its simply saying your site is bigger now, and it needs a new plan :wink:

    Can you please send the information that Mike requested here https://premium.wpmudev.org/forums/topic/lost-connection-on-new-post-of-the-main-website-in-wpmu#post-878335, that will help me a lot for further debugs.

    Thanks!

    Best regards,
    Hoang

  • Adam Czajczyk

    Hey Jeffrey,

    I hope you don't mind me jumping in here for a moment :slight_smile:

    There's one thing that's making me worried. It's this line from your error log:

    mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

    As @Hoang Ngo noticed, this suggests that there's an issue with FastCGI. With a little research I came up with this thread:

    https://wordpress.org/support/topic/issue-with-wordpress-going-unresponsive

    They say there that this is most likely GoDaddy's issue and that their forum "are flooded with people reporting the same thing".

    The question is on what level you can interact with server's settings. This article here gives us a possible solution/workaround of the problem but it might require contacting your server's tech support. Please take a look:

    https://techjourney.net/connection-reset-by-peer-mod_fcgid-ap_pass_brigade-failed-in-handle_request_ipc-function/

    Cheers,
    Adam

  • jeffrey_powers

    NIX WHAT I JUST SAID. Right after I posted, the problem came back. It might just be nobody is web surfing on a Friday afternoon...

    I might have found a solution to the problem. In digging around, I noticed on GoDaddy, I had a lot of domain names I let lapse (I didn't see me taking them anywhere), but they were still being indexed. I removed them from my domains area, then went into my subdomain area and nixed all those I wasn't using. 
    
    So far I've worked on 2-3 different posts without the lost connection coming up. My edit page is still acting wonky - slow to pull up the post page, but at least I can create content without losing it on save. 
    
    I'm going to continue to monitor for the next couple days just in case this is a fluke.
  • Adam Czajczyk

    Hello Jeffry,

    It seems to be getting more and more complex. I think at the moment there are only tree possible paths that would somehow solve the problem:

    1. Following the idea from my previous post and contacting GoDaddy's tech support as this is clearly a server-side issue.

    2. Breaking the network to multiple single sites (just as you tried and it seemed to be working) and manage those with ManageWP.

    3. Moving to another, possibly WP-dedicated hosting (though I realize that this might be the least and the worst option here).

    One way or another this is definitely connected with some sort of "too strict" or "too weak" server settings.

    Regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.