Batch Create process and 500 internal server error

I am getting a 500 internal server error with a bunch of "Premature end of script headers:" errors after running a batch create process. It created about 84 of my 98 sites but now I am totally locked out and am not sure what to do. I deleted what was in the batch queue in the db, but that had no effect. I have also restarted my vps to no avail.

  • DavidM
    • DEV MAN’s Mascot

    Hi coloradocolin,

    I'm not quite as familiar with Batch Create at this point as some of the other folks around here so let me see about getting them involved here as well. But just to start with, are you able to at least delete the plugin from your plugins folder to get the site back up?

    Oh and one other thing, would it be possible for you to either attach here or send through via our contact form, the file used for the import? If via contact form, if you could mention attention to David in the subject I'll be sure to get it.
    https://premium.wpmudev.org/contact/

    Cheers,
    David

  • coloradocolin
    • Design Lord, Child of Thor

    I only have the errors after the batch create process was ran.

    Here is the complete error: [Thu Mar 31 13:28:57 2011] [error] [client 96.60.127.246] Premature end of script headers: index.php

    This is repeated for all the different links I tried to access, i.e. wp-login.php etc.

    I also got one memory error, I am assuming this happened when I ran the batch:

    [Thu Mar 31 13:28:44 2011] [warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 131072 bytes) in /var/www/vhosts/lawyerduidefense.com/httpdocs/wp-includes/wp-db.php on line 1405

    This is the next error in the log:

    [Thu Mar 31 13:02:20 2011] [error] [client 96.60.127.246] Premature end of script headers: settings.php, referer: http://lawyerduidefense.com/wp-admin/network/settings.php?page=batch-create&action=loop

  • coloradocolin
    • Design Lord, Child of Thor

    I bumped it up in the php.ini from 32 to 64 then to 128. At 128 it just never loads. 32 and 64 instantly time out return 500 error. I cant bump it up anymore with the host without spending tons of money.

    The entire network, all posts, pages, admin, etc. returns 500.

    At this point, if no one else has any info for me I am going to wipe and reinstall from a back up.

  • Timothy
    • Chief Pigeon

    When I follow the link in your post above http://lawyerduidefense.com/ I see the first page, If I click any of the other pages including the article I get "Oops! This link appears to be broken." I've seen these before when there were issues with htaccess. The file can also create 500 internal server errors.

    Might be worth checking that out to be sure.

    Not sure if anyone has other ideas or experiences?

  • coloradocolin
    • Design Lord, Child of Thor

    On my end I only got a 500 error.

    I deleted the whole database, restored from a back up and am mostly back to my starting point. Site is coming back up and errors are gone.

    If I had to guess what happened, it would be that the batch create plugin taxed my memory and crashed the server midway through the script which then somehow corrupted my database, locking me out of the site.

    I am going to try this again, but I am going to break the batch into a few segments. The script successfully created about 70 sites before crashing. I'll let y'all know how it turns out.

  • coloradocolin
    • Design Lord, Child of Thor

    I found the issue. You cant have any duplicate entries in your batch list or it will choke. I had a couple in my list that were the same.

    Maybe in a future version, this plugin could run a check to see if a site already exists and if it finds one, stop the script. Its a bummer that a couple duplicate entries could bring down my whole site to the point I had to restore the database from a back up.

  • Timothy
    • Chief Pigeon

    That seems odd, normally when a unique identifier in MySQL is tried to insert twice it would just deny it and give a MySQL error. I wonder if the script just keeps trying to insert it in a loop? I'm not sure how it runs the batch create whether it is through the wp cron (page load) or through something else.

    This is one for those familiar with the code.

    I will eventually get around to testing all these plugins here on WPMUDEV. :slight_smile:

    Keep us up to speed on how you get on in your next attempt.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.