Support » Plugin: Duplicator - WordPress Migration Plugin » step 3 fatal error: memory

  • Resolved aris00

    (@aris00)


    Hey there,

    I am trying to restore a package from a Siteground shared hosting account to my local development server and I am getting the dreaded memory fatal error on step 3 when I try to install the package locally:

    Server Code: 200
    Status: OK
    Response:
    Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /Volumes/Macintosh HD/data/www/MOEBI/www/installer.php on line 1264

    That line is a recursive call recursiveUnserializeReplace()

    The package gets created without any problems at Siteground.

    I have tried to match the settings of the live and local setups.

    Here is some info:

    – WP 4.9.1
    – all plugins except Duplicator were disabled before creating the package (also tried with them activated, no difference)
    – Duplicator 1.2.32
    – PHP 7.2.1 on both
    – PHP max_execution_time = 120 on both
    – PHP memory_limit = 768M on both
    – wp-config.php define(‘WP_MEMORY_LIMIT’, ‘500M’);
    – local MariaDB VERSION() 10.2.12-MariaDB
    – local MariaDB max_allowed_packet 16777216
    – .htaccess has basic authentication (password protected directory) but no difference if I comment it out

    I also tried “Use Database Full Search Mode” but no change

    The zip file seems to have expanded fine.

    The last line on the installer-log.txt is:
    wp_options~ (335)

    On the same local development server I can install and run the Laravel 5.5 framework just fine.

    I have tried to follow all the advice from your FAQs and docs but I am stuck.

    Any ideas?

    Kind regards,
    Aris

    PS. I had used Duplicator Lite a year ago to develop two woocommerce sites and I was delighted at how helpful it was to make backups and move sites from the local to live and vice versa. I want to feel that again :)))

Viewing 11 replies - 1 through 11 (of 11 total)
  • Just tried with Duplicator 1.2.30, 1.2.22 and the developer/beta one. Same error.

    Created a fresh, default, WP installation on Siteground, added Duplicator 1.2.32 and it installed on my local development server without issues.

    Uploaded the package that gives me problems back to Siteground on a different directory/db/user and it installs without problems, fast too.

    Still stuck on how to make it work locally without the memory error.

    Created a fresh, default, WP installation on Siteground, added Duplicator 1.2.32 and it installed on my local development server without issues.

    Uploaded the package that gives me problems locally back to Siteground on a different directory/db/user and it installs without problems, fast too.

    On the local server I set the memory_limit to 4096M, then to -1 and the installer still fails. From what I can find online, this sometimes comes down to a syntax error.

    Note that I restart my apache with every change to the local php.ini

    Still stuck on how to make it work locally without the memory error.

    Final attempt:

    Looked in the installer.php file and there is a:
    ini_set(‘memory_limit’, ‘2048M’);

    I set it to:
    ini_set(‘memory_limit’, ‘4096M’);
    and the installer failed, took longer, but did not display a response message.

    Then I set it to:
    ini_set(‘memory_limit’, ‘8186M’);
    again, the installer failed, took even longer, but did not display a response message.

    Finally, I set it to:
    ini_set(‘memory_limit’, ‘-1’);
    the installer kept going for quite a few minutes, httpd took 23.39GB of memory on my 4GB iMac, the beach ball started spinning, the computer became unresponsive, I managed to restart apache, closed the window, back to normal.

    Note that I have also given the DB user all privileges on the local machine.

    So, still stuck.

    • This reply was modified 1 year, 10 months ago by aris00.
    Plugin Author Cory Lamle

    (@corylamleorg)

    Hey @aris00,

    Thanks for the feedback! There are a few items in the FAQ that may provide a solution to this issue, this one may get you going.

        – What if I get database errors or general warnings on the install report?
        – https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-260-q

    Look for the section “Query Size Limit”… its related to this:
    https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

    If you have a really large table you can exclude it on step 3 of the installer also check the installer-log.txt file for clues as well.

    Let me know if any of them help~

    Hello, we just wanted to chime in and mention we’re running into the same exact issue. Here’s the error from the error_log file within our local setup:

    PHP Fatal error: Allowed memory size of 5242880000 bytes exhausted (tried to allocate 262144 bytes) in /path/to/htdocs/website/dpro-installer/classes/class.engine.php on line 400, referer: http://localhost/website/dpro-installer/main.installer.php?archive=%2Fpath%2Fto%2Fhtdocs%2Fwebsite%2F20180207_websitetitle_a7129b96b825fcc95983_20180207151418_archive.zip&bootloader=installer.php&

    I notice that the “tried to allocate 262144 bytes” is the exact same as in @aris00 case.

    For our local environment, we use XAMPP on Mac OS 10.13
    – WordPress 4.9.2
    – Duplicator Gold 3.5.7.1
    – PHP 7.2.1-0
    – max_execution_time 1200
    – memory_limit -1 (unlimited)

    If you need any additional information, please let us know.

    Hi
    I encountered the same issue too. I am using MAMP for deploying a local copy.

    MAMP4 4.5
    Duplicator version: Version 1.2.40
    MySQL: 5.6.38
    PHP: PHP Version 7.2.1
    Wordpress: 4.9.6

    1. I have tried to set the memory_limit to 2048M in installer.php. It throws the following error message on Step 3.
    In php_error.log
    [27-Jun-2018 02:34:42 UTC] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /Applications/MAMP/htdocs/installer.php on line 1306

    The last line on the installer-log.txt is:
    wp_options~ (1048)

    Refer to installer.php

    
    Line 1306 private static function isConstant($token)
    	{
    		return $token == T_CONSTANT_ENCAPSED_STRING || $token == T_STRING || $token == T_LNUMBER || $token == T_DNUMBER;
    	}
    

    2. If the memory_limit was set to -1, the activity monitoring process shows the process httpd keeps growing in memory size over 20GB and finally hanged.

    PS. If I switch back to MAMP3 version 3.0.6 with PHP version 5.5.14, it could restore the backup successfully.

    • This reply was modified 1 year, 4 months ago by manesvenom.
    • This reply was modified 1 year, 4 months ago by manesvenom.
    • This reply was modified 1 year, 4 months ago by manesvenom.

    Hey,

    i do have exactly the same error and the settings in the PHP.INI are all set to values that are more than enough … Do you have a solution yet?? I posted the original error on stackexchange as you can see here:

    https://wordpress.stackexchange.com/questions/307636/fatal-error-out-of-memory-with-the-duplicator-plugin

    Thanks!

    • This reply was modified 1 year, 4 months ago by nipnic.

    I found a solution that worked for me. I downgraded my PHP-Version from 7.2.5 to 5.6.36 and that fixed it.

    Here is a good explanation how to configure your server:

    https://stackoverflow.com/questions/45790160/is-there-way-to-use-two-php-versions-in-xampp

    • This reply was modified 1 year, 4 months ago by nipnic.

    Is there a solution yet? Still encountering the problem. Downgrading a servers PHP version should not be the way to go.

    Hi,

    I ran into the same problem (Allowed memory size … exhausted) and after hours of debugging I finally found a solution. Maybe this is helpful for somebody:

    To recap:
    When migrating an archive with duplicator, the install process triggers the following PHP error:

    PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /Applications/MAMP/htdocs/wordpress/installer.php on line 2368

    Also the installer-log.txt showed that the last item installer.php was processing correctly was a an entry in the wp_options table.

    So in order to find the corrupted item I used the log function (DUPX_Log::info()) in the installer.php to log the $where_sql clauses when the actual row update is running.

    In my case this led me to the wpml_notices option in the wp_options table.

    I then ran the value of that option which was:

    a:1:{s:26:"taxonomy-term-help-notices";a:1:{s:8:"category";O:11:"WPML_Notice":23:{s:30:"WPML_Noticedisplay_callbacks";a:1:{i:0;a:2:{i:0;O:37:"WPML_Taxonomy_Translation_Help_Notice":2:{s:57:"WPML_Taxonomy_Translation_Help_Noticewpml_admin_notices";O:12:"WPML_Notices":5:{s:27:"WPML_Noticesnotice_render";O:18:"WPML_Notice_Render":3:{s:38:"WPML_Notice_Renderdismiss_html_added";N;s:35:"WPML_Notice_Renderhide_html_added";N;s:39:"WPML_Notice_Rendercollapse_html_added";N;}s:21:"WPML_Noticesnotices";a:1:{s:26:"taxonomy-term-help-notices";a:1:{s:8:"category";r:3;}}s:31:"WPML_Noticesnotices_to_remove";a:1:{s:12:"requirements";a:1:{i:2;s:25:"enable-translation-editor";}}s:23:"WPML_Noticesdismissed";a:0:{}s:28:"WPML_Noticesuser_dismissed";N;}s:45:"WPML_Taxonomy_Translation_Help_Noticenotice";r:3;}i:1;s:26:"should_display_help_notice";}}s:15:"WPML_Noticeid";s:8:"category";s:17:"WPML_Noticetext";s:256:"Übersetzung von Kategorien? Nutzen Sie die <a href="http://localhost/wordpress2/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/taxonomy-translation.php&taxonomy=category"> Kategorie Übersetzung</a>-Tabelle für eine einfachere Übersetzung.";s:27:"WPML_Noticecollapsed_text";N;s:18:"WPML_Noticegroup";s:26:"taxonomy-term-help-notices";s:35:"WPML_Noticerestricted_to_user_ids";a:0:{}s:20:"WPML_Noticeactions";a:1:{i:0;O:18:"WPML_Notice_Action":9:{s:27:"WPML_Notice_Actiondismiss";b:0;s:37:"WPML_Notice_Actiondisplay_as_button";b:0;s:24:"WPML_Notice_Actionhide";b:0;s:24:"WPML_Notice_Actiontext";s:10:"Ausblenden";s:23:"WPML_Notice_Actionurl";s:1:"#";s:36:"WPML_Notice_Actiongroup_to_dismiss";s:26:"taxonomy-term-help-notices";s:31:"WPML_Notice_Actionjs_callback";s:40:"wpml_dismiss_taxonomy_translation_notice";s:42:"WPML_Notice_Actiondismiss_different_text";b:1;s:31:"WPML_Notice_Actionlink_target";N;}}s:28:"WPML_Noticecss_class_types";a:1:{i:0;s:4:"info";}s:24:"WPML_Noticecss_classes";a:0:{}s:24:"WPML_Noticedismissible";b:0;s:31:"WPML_Noticeexclude_from_pages";a:0:{}s:21:"WPML_Noticehideable";b:0;s:24:"WPML_Noticecollapsable";b:0;s:30:"WPML_Noticerestrict_to_pages";a:0:{}s:38:"WPML_Noticerestrict_to_page_prefixes";a:0:{}s:35:"WPML_Noticerestrict_to_screen_ids";a:0:{}s:34:"WPML_Noticehide_if_notice_exists";N;s:43:"WPML_Noticedismissible_for_different_text";b:1;s:31:"WPML_Noticedefault_group_name";s:7:"default";s:25:"WPML_Noticecapabilities";a:0:{}s:26:"WPML_Noticedismiss_reset";b:0;s:18:"WPML_Noticeflash";b:0;s:25:"WPML_Noticenonce_action";N;}}}

    through here: http://unserialize.onlinephpfunctions.com/

    I got an error message telling me that
    var_export does not handle circular references in ...

    FIX:
    I deleted the value for wpml_notices and after that the installer.php ran successfully!

    • This reply was modified 11 months, 1 week ago by Janeamen.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘step 3 fatal error: memory’ is closed to new replies.