• Resolved adriansquared

    (@adriansquared)


    Hi there,

    This error only occurs when database backup is run, files backup and xml backup are working properly. The plugin has been working perfectly until yesterday and the site hadn’t been touched before the problem occurred.

    I set the memory limit to 256M, but based on the error log, it seems like allocating more than 1GB. The version of BackWPup I am using is 3.4.4, I also tried 3.4.1 and it returned the same result. Also, running this task caused my CPU usage to 100%, even after the task is aborted, I called my hosting company and they said the task was still running.

    I am running this site on a shared hosting and I have 5 other sites running on this shared hosting as well, but there is no problem running database backup on another site.

    What could be the issue here?

    Thanks in advance.

    Please find the following error log.

    [INFO] BackWPup 3.4.1; A project of Inpsyde GmbH
    [INFO] WordPress 4.9.1 on
    [INFO] Log Level: Debug
    [INFO] BackWPup job: Testing Backup to Folder; DBDUMP
    [INFO] Runs with user: (0)
    [INFO] BackWPup no automatic job start configured
    [INFO] BackWPup job started manually
    [INFO] PHP ver.: 7.0.27 (64bit); litespeed; Linux
    [INFO] Maximum PHP script execution time is 300 seconds
    [INFO] Script restart time is configured to 20 seconds
    [INFO] MySQL ver.: 10.2.12-MariaDB
    [INFO] Web Server: LiteSpeed
    [INFO] curl ver.: 7.54.0; OpenSSL/1.0.2k
    [INFO] Temp folder is: /home/theparad/public_html/assets/uploads/backwpup-b5e2e6-temp/
    [INFO] Logfile is: /home/theparad/public_html/assets/uploads/backwpup-b5e2e6-logs/backwpup_log_b5e2e6_2018-01-12_10-01-36.html
    [INFO] Backup file is: /home/theparad/public_html/assets/uploads/backwpup-test/backwpup_b5e2e602_2018-01-12_10-01-36.zip
    [12-Jan-2018 10:01:36] 1. Try to backup database …
    [12-Jan-2018 10:01:36] Connected to database theparad_parade on localhost
    [12-Jan-2018 10:01:36] Backup database table “tswp_commentmeta” with “~0” records
    [12-Jan-2018 00:01:36 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1634037384 bytes) in /home/theparad/public_html/assets/plugins/backwpup/inc/class-mysqldump.php on line 506 [12-Jan-2018 10:01:36] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1634037384 bytes)
    [12-Jan-2018 10:01:36] Restart after 1 seconds.
    [12-Jan-2018 10:01:38] 2. Try to backup database …
    [12-Jan-2018 10:01:38] Connected to database theparad_parade on localhost
    [12-Jan-2018 00:01:38 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1279410544 bytes) in /home/theparad/public_html/assets/plugins/backwpup/inc/class-mysqldump.php on line 506 [12-Jan-2018 10:01:38] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1279410544 bytes)
    [12-Jan-2018 10:01:38] Restart after 1 seconds.
    [12-Jan-2018 10:01:41] 3. Try to backup database …
    [12-Jan-2018 10:01:41] Connected to database theparad_parade on localhost
    [12-Jan-2018 00:01:41 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1279410544 bytes) in /home/theparad/public_html/assets/plugins/backwpup/inc/class-mysqldump.php on line 506 [12-Jan-2018 10:01:41] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1279410544 bytes)
    [12-Jan-2018 10:01:41] Restart after 1 seconds.
    [12-Jan-2018 10:01:43] ERROR: Step aborted: too many attempts!
    [12-Jan-2018 10:01:43] 1. Trying to generate a manifest file …
    [12-Jan-2018 10:01:43] Added manifest.json file with 4.35 KB to backup file list.
    [12-Jan-2018 10:01:44] 1. Trying to create backup archive …
    [12-Jan-2018 10:01:44] Compressing files as ZipArchive. Please be patient, this may take a moment.
    [12-Jan-2018 10:01:44] Adding Extra files to Archive
    [12-Jan-2018 10:01:44] Backup archive created.
    [12-Jan-2018 10:01:44] Archive size is 1.76 KB.
    [12-Jan-2018 10:01:44] 2 Files with 4.57 KB in Archive.
    [12-Jan-2018 10:01:45] ERROR: Job has ended with errors in 9 seconds. You must resolve the errors for correct execution.

Viewing 15 replies - 16 through 30 (of 41 total)
  • Thread Starter adriansquared

    (@adriansquared)

    Hi @duongcuong96

    Just wondering if there are any updates about this issue and the plugin?

    Thank you.

    • This reply was modified 8 years, 2 months ago by adriansquared.

    @mindctrl
    This problem happens because of MariaDB 10.2.12 as I said in another topic: https://wordpress.org/support/topic/backup-failed-allowed-memory-size-exhausted#post-9939515
    There is a new stable version of MariaDB ( 10.2.13 ), could you please contact your hoster and tell them to upgrade?
    After that, please try again.
    Thanks!

    @duongcuong96 I don’t use MariaDB, and as far as I see I don’t have memory issues with MySQL either.

    @duongcuong96
    Thanks for the follow up.
    My hoster has upgraded to the 10.2.13 version of MariaDB but the memory issue is still there when trying to run a DB backup

    happyAnt

    (@duongcuong96)

    @njwp, @mindctrl
    there is a working solution in here:
    https://wordpress.org/support/topic/allowed-memory-size-of-xxx-exhausted-tried-to-allocate/#post-10100334
    so could you please try to enable nd_pdo and nd_mysql extensions instead of pdo and mysql? and then try to run again?
    Normally, these extensions could be changed from your cPanel PHP extension setting 🙂
    Hope that help 😀

    @duongcuong96, I’ll reiterate. I do not have memory issues. There are no memory notices/errors in any server logs or in BackWPUp logs. Do you have a concrete way to troubleshoot this issue? Anything I can do/enable/watch to get some insight?

    @duongcuong96
    Thanks for the solution.

    I disabled: pdo_mysql and mysqli
    and enabled: nd_pdo_mysql and nd_mysqli

    BackWPup now runs correctly.

    My site is not live as it is still in the setup phase. I certainly wouldn’t be happy making this sort of change on a live site, as I have no knowledge of the difference in those PHP extensions and would assume a hoster configures a site in the best way.

    Thread Starter adriansquared

    (@adriansquared)

    Hi @duongcuong96,

    Enabling nd_pdo and nd_mysql helps solve the issue, thanks.

    happyAnt

    (@duongcuong96)

    @adriansquared

    Glad that it’s working for you :),
    If you have any question or issues about BackWPUp, feel free to let us know 🙂
    Have a nice day :).

    Btw, If you find BackWPUp is useful for you, we would really appreciate if you leave a positive review and rating.
    This would encourage us to develop new free features and provide free support 😀
    https://wordpress.org/support/plugin/backwpup/reviews/

    Hi @duongcuong96, I’ve got the same issue since a few days.

    I disabled: pdo_mysql and mysqli
    and enabled: nd_pdo_mysql and nd_mysqli
    but it doesn’t work.

    My MariaDB version is 10.2.17-MariaDB, PHP version is 7.1.

    Thank you!

    @vertigofactory

    Please show me your server configuration by go to BackWPUp -> Settings -> Infomation -> and press “Get debug info”

    Also, please set log level to debug mode, BackWPUp -> Settings -> Logs -> Logging Level -> Debug(not translated ) -> save , re-run the job again then give me latest debug log file.
    You can get latest backup log file at BackWpUp -> Logs.

    Since the log file will be pretty long, so I suggest you upload log file to Pastebin or something like that 🙂

    @duongcuong96 here is the server configuration:

    Versione WordPress: 4.9.8
    Versione BackWPup : 3.6.0
    Versione PHP: 7.1.21  (64bit)
    Versione MySQL: 10.2.17-MariaDB
    Versione cURL: 7.60.0
    Versione cURL SSL : OpenSSL/1.0.2k
    Server self connect: Risposta Test O.K.
    Server: Apache
    Sistema Operativo: Linux
    PHP SAPI: litespeed
    Utente PHP attuale: udyspqgt
    Tempo di esecuzione massimo: 30 secondi
    BackWPup maximum script execution time: 300 secondi
    WP cron alternativo: Off
    Disabilita WP Cron: Off
    CHMOD Dir: 0755
    Server Time: 7:12
    Blog Time: 09:12
    Blog Timezone: Europe/Rome
    Blog Time offset: 2 ore
    Lingua del blog: it-IT
    MySQL Client encoding: utf8
    PHP limite della memoria: 256M
    WP limite della memoria: 256M
    WP limite massimo della memoria: 256M
    Memoria in uso: 22,00 MB
    Funzioni PHP disabilitate:: system, passthru, exec, popen, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, escapeshellcmd, define_syslog_variables, posix_uname, posix_getpwuid, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellarg, posix_uname, ftp_exec, ini_alter, ini_restore, inject_code, syslog, openlog, define_syslog_variables, apache_setenv, eval, phpAds_XmlRpc, phpAds_remoteInfo, phpAds_xmlrpcEncode, phpAds_xmlrpcDecode, xmlrpc_entity_decode, fp, fput system, passthru, exec, popen, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, escapeshellcmd, define_syslog_variables, posix_uname, posix_getpwuid, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellarg, posix_uname, ftp_exec, ini_alter, ini_restore, inject_code, syslog, openlog, define_syslog_variables, apache_setenv, eval, phpAds_XmlRpc, phpAds_remoteInfo, phpAds_xmlrpcEncode, phpAds_xmlrpcDecode, xmlrpc_entity_decode, fp, fput
    Estensione PHP caricate:: Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, litespeed, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcntl, pcre, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, readline, session, shmop, snmp, soap, sockets, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

    here is the log (I removed the section about the upload to Dropbox, because that part works):

    [28-Aug-2018 09:13:37] 1. Try to backup database …
    [28-Aug-2018 09:13:37] Connected to database wp on localhost
    [28-Aug-2018 09:13:37] Backup database table "wp_commentmeta" with "1148" records
    [28-Aug-2018 07:13:37 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3131449368 bytes) in **/public_html/wp-content/plugins/backwpup/inc/class-mysqldump.php on line 506 [28-Aug-2018 09:13:37] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3131449368 bytes)
    [28-Aug-2018 09:13:37] Restart after 1 seconds.
    [28-Aug-2018 09:13:38] 2. Try to backup database …
    [28-Aug-2018 09:13:38] Connected to database wp on localhost
    [28-Aug-2018 07:13:39 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3130427152 bytes) in **/public_html/wp-content/plugins/backwpup/inc/class-mysqldump.php on line 506 [28-Aug-2018 09:13:39] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3130427152 bytes)
    [28-Aug-2018 09:13:39] Restart after 1 seconds.
    [28-Aug-2018 09:13:40] 3. Try to backup database …
    [28-Aug-2018 09:13:40] Connected to database wp on localhost
    [28-Aug-2018 07:13:40 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3130806776 bytes) in **/public_html/wp-content/plugins/backwpup/inc/class-mysqldump.php on line 506 [28-Aug-2018 09:13:40] ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3130806776 bytes)
    [28-Aug-2018 09:13:40] Restart after 1 seconds.
    [28-Aug-2018 09:13:41] ERROR: Step aborted: too many attempts!
    [28-Aug-2018 09:13:41] 1. Trying to generate a manifest file …
    [28-Aug-2018 09:13:41] Added manifest.json file with 8,25 KB to backup file list.
    [28-Aug-2018 09:13:41] 1. Trying to create backup archive …
    [28-Aug-2018 09:13:41] Compressing files as TarGz. Please be patient, this may take a moment.
    [28-Aug-2018 09:13:41] Adding Extra files to Archive
    [28-Aug-2018 09:13:41] Backup archive created.
    [28-Aug-2018 09:13:41] Archive size is 2,44 KB.
    [28-Aug-2018 09:13:42] 2 Files with 8,47 KB in Archive.
    [...]
    [28-Aug-2018 09:13:47] ERROR: Job has ended with errors in 10 seconds. You must resolve the errors for correct execution.

    Hi @vertigofactory
    Please try to change WP maximum memory limit to about 512M then try again?
    Is that helps?

    @duongcuong96: just tried, nothing changes.

    @vertigofactory
    is your website recently have a lot of content or something like that that can lead to the database is too large?

Viewing 15 replies - 16 through 30 (of 41 total)

The topic ‘Database backup failed because memory is exhausted’ is closed to new replies.