WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: BackWPup] Backup often gets stuck on "Create Backup Zip File..."; script doesn't terminate (22 posts)

  1. dgw
    Member
    Posted 4 years ago #

    I have BackWPup set up to run daily. However, it's been getting stuck on the "Create Backup Zip File..." step of the backup and running interminably; I've terminated scripts more than 14 hours after the jobs started. I have script execution limited to 300 seconds in the plugin settings.

    I am using WordPress 2.9.1 on a DreamHost shared Linux server with PHP5 running as fCGI. The pre-ZIP backup size is between 50 and 60 MB at this point.

    Any idea why it keeps running away? I can't stop the script without logging into SSH and guessing at which PHP process to kill.

    I'll add the relevant (very long) backup logs if you think it'll help.

    Other than this little issue, thanks for a great plugin! I'm going to let this latest runaway continue until after the next job runs to see what happens.

    http://wordpress.org/extend/plugins/backwpup/

  2. dgw
    Member
    Posted 4 years ago #

    I am wondering if the issue goes further. I just ran a manual backup and watched the process from SSH. Using top -c, I see that a PHP process is spawned to run the backup but it doesn't exit once the job is complete. This could be something to do with running the plugin when using PHP as a CGI.

  3. dgw
    Member
    Posted 4 years ago #

    I contacted DreamHost support about this and the tech thinks that the zip process is being killed by their procwatch daemon because it uses too much memory. He suggested optimizing the script to use less RAM; however, I don't know if that's possible without writing a from-scratch implementation, which could be far more trouble than it's worth.

  4. carlosman
    Member
    Posted 4 years ago #

    I think we both may be having the same problem. Mine shows up in a Windows 2008 Web Server, using PHP5 with FastCGI. My related post is here. Please, have a look. We may be able to help each other with testing for a solution. I think this could very well be, as you suggest, a memory exhaustion problem. That would be, I think, easier to solve than fixing/getting PclZip fixed.

  5. dgw
    Member
    Posted 4 years ago #

    I've subscribed to your related thread, carlosman.

    There are only two ways I can think of to combat memory exhaustion: Increase available memory, or reduce memory usage. Increasing available memory doesn't seem to be an option in my situation, since DreamHost's shared servers have an undisclosed hard limit. Decreasing usage would be more feasible, but it would require rewriting PclZip to optimize its usage or finding a new ZIP library.

    I'll look into the other options for PHP ZIP libraries.

  6. Daniel Hüsken
    Member
    Posted 4 years ago #

    Hello,

    in my Plugin i use the option PCLZIP_OPT_ADD_TEMP_FILE_ON from PCLZIP to reduse the memory usage. normely it needs no more as 10MB of Memory to crate the zip file.
    The creation of the file list can take many memory if thre a very lot of files.

    I can't take a other zip lib because the makes the compressen complete in the memory.

  7. Daniel Hüsken
    Member
    Posted 4 years ago #

    I have changed th file list generation a littel bit. now pclzip must not convert it again. IT needs more memory on generation. but i must dont use the add method for the databases dump file to add it to zip.
    pleace test it again with the dev. version.

  8. dgw
    Member
    Posted 4 years ago #

    Tried for the last few days; just let my schedule run as usual. Jobs don't seem to be getting killed any more; the logs appear to now end normally. I think it's fixed! Marking this thread as resolved; will reopen if the bug comes back.

    Thank you so much!

    Incidentally, is it BackWPup that created these pclzip-13hexcharhash.gz files in my domain root? I can't think of any other plugin I use (list on this page) that might have created those.

  9. Daniel Hüsken
    Member
    Posted 4 years ago #

    Thanks for the feadback.

    Normely the temp folder for PCLZIP Temp files ist set to wp-content/backupwp folder and PCLZIP wil delete them after use.

  10. dgw
    Member
    Posted 4 years ago #

    I was having this issue less, and then I updated to 0.8.0 and now it seems that, once again, most daily backup jobs just continue to spin into eternity until the next day's run supersedes them. (Was going to "unresolve" this topic, but—my apologies—I never "resolved" it in the first place. My mistake.)

  11. dgw
    Member
    Posted 4 years ago #

    Confirmed. Since the upgrade, not a single backup job has completed. The textfile logs are empty, and the job list says the last success was 2010-03-31.

  12. Daniel Hüsken
    Member
    Posted 4 years ago #

    Please update to 0.8.1 ther you kan make error log for pclzip too.

  13. dgw
    Member
    Posted 4 years ago #

    The last success is still 2010-03-31.

    I've watched the process from SSH using top -c and watched as the PHP process (an instance of php5.cgi on DreamHost) ramps up its memory usage until it is killed by a monitoring script. It never gets to the point of generating much of a log, except for a list of all the files it's adding.

    I don't think there's anything you can do except reduce the memory usage, which would mean switching to a different compression library. PclZip uses in-memory compression to minimize the usage of temporary files; a library that uses temp files might work better on systems that limit memory usage.

    Edit: Also, perhaps another compression format like GZip would have better luck.

  14. saharusa
    Member
    Posted 4 years ago #

    I also think switching to another compression format is a must.

  15. Daniel Hüsken
    Member
    Posted 4 years ago #

    did you now a libiery for GZip that not works in memory ?
    PclZip uses 8 MB of Memory and uses temp files.

  16. Daniel Hüsken
    Member
    Posted 4 years ago #

    good news for you....
    backwpup now supports (in dev. version) tar.gz and tar and tar.bz2 Archives.

    PLease test the development Version and give feadback.

  17. dgw
    Member
    Posted 4 years ago #

    It worked once, but now it's generating "File Not Exists" log entries and a "Not Found" page in the iframe on the status page.

  18. Daniel Hüsken
    Member
    Posted 4 years ago #

    I know the problem. i have it too on my hoster, but not in my development envoyerment.

    the job works on with shedule.

  19. Daniel Hüsken
    Member
    Posted 4 years ago #

    i have changedthe output buffering a bit please test again.

  20. dgw
    Member
    Posted 4 years ago #

    The jobs have been working on schedule using .tar.gz and they don't seem to be getting killed. (Of course, I did cut the data set by about 80%, so that must have something to do with it.)

    However, after upgrading to the development version today I find I can no longer do a "Run Now". I get a blank page in the iframe and nothing appears in the logs.

  21. dgw
    Member
    Posted 4 years ago #

    No successful backups since the day of my last post in this thread. The logs since seem to end during the database dump.

    I'll admit, I changed my settings around so it might be unrelated. I'd rather not open another thread, so I have to ask: What happens if I uncheck the options to back up the blog files but add directories (including the blog's directory) to the text field? It doesn't seem to be backing up the blog directory if I don't check those boxes.

  22. dgw
    Member
    Posted 4 years ago #

    Another update: Using .tar.gz in the development version, my backups seem to be succeeding. For the moment, at least, this issue is resolved. I can't wait for the final 1.0.0 release. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags