• Resolved kobuch

    (@kobuch)


    ======================================================
    What happened:
    ======================================================

    I’ve encountered an error during my backup:

    ——————————————————
    BackUpWordPress detected issues with your last backup
    ——————————————————
    php: proc_open() [function.proc-open]: fork failed – Cannot allocate memory, /home/use-id/usability.space/docs/wp-content/plugins/backupwordpress/vendor/symfony/process/Process.php, 290
    ——————————————————

    I received this ^ error after started my backup of database and files manually.

    ======================================================
    What I’ve tied to solve my problem:
    ======================================================

    (1) I’ve tried to increase memory limits in wp-includes/default-constants.php as follows:

    // set memory limits
    if ( !defined(‘WP_MEMORY_LIMIT’) ) {
    if( is_multisite() ) {
    define(‘WP_MEMORY_LIMIT’, ‘256M’);
    } else {
    define(‘WP_MEMORY_LIMIT’, ‘256M’);
    }
    }

    if ( ! defined( ‘WP_MAX_MEMORY_LIMIT’ ) ) {
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );
    }

    (2) I’ve tried to set my hosting MEMORY_LIMIT value to unlimited.

    (3) As it is suggested here https://www.ads-software.com/support/topic/backup-error-9/ , I’ve tied to switch to a different zip engine in wp-config:

    define(‘UPDRAFTPLUS_NO_BINZIP’, true);

    ——————————————————
    The result of all my tries:
    ——————————————————

    Nothing has helped, and after the backup Backupwordpress still tells me about the above mentioned error.

    ======================================================
    My question:
    ======================================================

    What has gone wrong?

    How can I cure the error?

    Will the error allow me to make successful backups with WordPressbackup?

    ======================================================

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Katrina “Kat” Moody

    (@katmoody)

    Hi there –

    I’m sorry you’re having trouble with the backups running. In response to your great notes above I wanted to reply to those and then see if we can help you troubleshoot this a bit further, okay?

    (1) – Do you mean that you edited the default-constants.php file in the wp-includes folder? If so, I just wanted to give you a word of warning to NEVER edit your core WP files directly. There are other ways of changing the defaults and they are safer than editing the core files would be. If you haven’t already, you should go ahead and change that back to the default file. If you need to change those you can check in the Codex on how to do that in the wp-config file or even Google for how you might adjust it in other ways. But it’s a good rule of thumb to never alter core WordPress files if you can help it.

    (2) – how did you set yours to unlimited? Did you check with your host specifically on how they do it? Some hosts have different ways of setting those so I wanted to make sure you did it according to who your host is ??

    (3) – unfortunately that value might work if you were using the Updraft Plus backup plugin, but it wouldn’t work with our plugin as it’s not one of our defined variables ??

    Regarding your error:

    php: proc_open() [function.proc-open]: fork failed – Cannot allocate memory, /home/use-id/usability.space/docs/wp-content/plugins/backupwordpress/vendor/symfony/process/Process.php, 290

    This is related to the proc_open function, which our plugin uses to run the Unix Zip Command. If that fails (which this is indicating it did), the plugin should fall back to using the ZipArchive function, which is built off the basic php zip functionality. Your error is telling me that the fallback is not working. What I’m not clear about is if it is not working because you are running out of memory or because proc_open is not enabled and the fallback isn’t available either.

    Can you confirm a few things for me?

    • Do the backups complete? (Are there backups listed underneath any of your schedules in the admin?)
    • Who is your host? Do they have a way for you to edit your php.ini file or any other way to control the memory_limit for your site on the server? (This is usually handled via what’s called a php.ini file, but some hosts have different ways of handling these, and some hosts have a ‘hard limit’ in place which disallows any editing of the memory_limit)
    • IF you are able to edit the php.ini file for your host, does the error remain?
    • Ask your host if they disable the proc_open function on your server and if they do, whether they can enable it again.

    Let me know the above answers and we can go from there, okay?

    Kat

    Plugin Contributor Katrina “Kat” Moody

    (@katmoody)

    Hey there – I’ve listed this as resolved at this time because I didn’t hear back from you. Let me know if you still need help!
    Kat

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems with backup: Fork failed – Cannot allocate memory’ is closed to new replies.