WordPress.org

Ready to get started?Download WordPress

Forums

Backup
Never Uploads to Google Drive + No Failure Notice (23 posts)

  1. drueck
    Member
    Posted 1 year ago #

    I am running Backup version 2.0, and when I attempted a manual backup it successfully dumped the database and created the archive, then the log shows that it attempted to upload to Google Drive, but there is no log entry after that indicating either success or failure, and the file is not showing up in my Google Drive.

    When I ran the manual backup in my browser it worked for quite a while and then displayed the "Internal Server Error" page.

    Any suggestions?

    Thanks so much,

    -David

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

  2. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    Your PHP error log might reveal some more information, but my guess is PHP ran out of memory to use.

    Can you tell me about your setup (PHP and WP version, plugin configuration, how large the database and files are)?

  3. drueck
    Member
    Posted 1 year ago #

    This WP install is on a Dreamhost shared hosting plan and it doesn't look like php error logging is enabled. I'll try to get that enabled and see what it shows.

    In the meantime, I'm running PHP 5.3 FastCGI and WordPress 3.4. Here are the backup settings:

    • Local folder path: wp-content/backup
    • Drive folder id: [the folder id]
    • Authorization: granted
    • When to backup: daily
    • Store a maximum of: 10 backups locally and 2 backups on Google Drive
    • What to back up: Database, Content, Uploads, Plugins
    • Chunk size: 0.5MB
    • Time limit: 120 seconds

    According to the backup log, the archive file size is 78MB. Yesterday there were no log entries after the NOTICE: Attempting to upload archive to Google Drive, but when I tried it again today I got the following:

    ERROR: name lookup timed out (http_request_failed)
    NOTICE: Backup process completed in 59.28 seconds. Initial PHP memory usage was 20 MB and the backup process used another 7 MB of RAM.

    And although php error logging is not enabled, I checked the http error log and the following entry was created each time I tried to manually run the backup:

    Premature end of script headers: index.php

    That's all the info I have at this point, but I'll try to enable php logging and let you know what I find out.

    Thanks,

    -David

  4. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    You could try disabling cURL in PHP, or following Carlton's instructions here.

  5. agentsully
    Member
    Posted 1 year ago #

    If I disable cURL will that affect anything else on my wordpress site?

    Also would lengthening the "time limit" in advanced settings help?

    thank you

  6. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    If I disable cURL will that affect anything else on my wordpress site?

    Yes that would affect all http requests made from WordPress.

    Also would lengthening the "time limit" in advanced settings help?

    Assuming you have the same problem as the original poster, I would have to say that modifying the time limit does not have any effect.

  7. agentsully
    Member
    Posted 1 year ago #

    I lengthened the time and that seemed to make it work.
    I lengthened it to 240 seconds. Do you think this will pose any problems?

    thank you kindly.

  8. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    No, there should be no problems with that.

    I'm glad you got it to work.

  9. drueck
    Member
    Posted 1 year ago #

    Update:

    I turned on php error logging and I was surprised and disappointed to see that even though the backup still failed to upload to my Google Drive, it did not show anything in the php error log (it would have been very helpful if something showed up). I verified that the php error logging is working by writing a quick php script with an error in it and running it from my browser and that error did show up in the log. Not sure if WordPress somehow redirects php errors to a different log, but if not, there is just no error showing up.

    I haven't tried disabling cURL, but I don't think that's the issue. I read that thread you linked to, and I don't think that has anything to do with my problem. I am running the latest version of WP, and I can update my plugins and themes without any problems. That "name lookup timed out" error has not appeared again. I think that was a red herring.

    I also increased the "time limit" setting to 240 like agentsully did and there was no change.

    Would you suggest changing the time limit and/or memory limit php settings? Any other suggestions?

    Thanks,

    -David

  10. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    What error are you getting now then?

    WordPress stores the error log in wp-content/debug.php, but please note that you have to have to enable logging in the wp-config file by adding something like this:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);
  11. drueck
    Member
    Posted 1 year ago #

    90% of the time I'm not getting any error in backup.log. Usually the last entry in the log is NOTICE Attempting to upload archive to Google Drive with no subsequent error line.

    Out of 12 attempts so far to run the backup there have been two errors noted in the log. The first error was that name lookup timed out, which has only happened once. The second which has also only happened once is Operation timed out after 5000 milliseconds with 0 bytes received (http_request_failed). That has also only occurred once in the log out of 12 attempts.

    I will try to turn on the WordPress debug logging and let you know if anything shows up there.

    Thanks,

    -David

  12. drueck
    Member
    Posted 1 year ago #

    Cool, finally got some debugging info for you. There were two identical entries in the debug.log after attempting to run the manual backup again:

    PHP Notice: Undefined property: Backup::$gdocs in [...]/plugins/backup/backup.php on line 854

    -David

  13. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    Not getting any error messages in Backup's log file leads me to believe one of the following is happening:

    1. PHP is running out of memory
    2. The script times out
    3. The upload takes a lot of time (especially if you have a large archive and a slow connection between your server and Google Drive)

    The first two should show up in the error log. In case the upload takes to much time you should try and let a normal scheduled backup run instead of doing it manually. That should work. What size is the archive anyway?

  14. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    Ok...

    My bad then. I have a typo in my code. I'll fix it asap. If you want to fix it yourself just add a 'g' in front of docs on line 102 of backup.php.

    Sorry for that.

  15. drueck
    Member
    Posted 1 year ago #

    No problem. Thanks for patiently working with me to get to the bottom of it! I went ahead and fixed the typo and tried to run it again manually and I think it probably timed out in the browser, so I changed the schedule to never, saved it, then changed it back to daily. I'm watching the log now as it's running the scheduled backup. I'll let you know if it successfully uploads the archive this time. The archive is currently 198MB so I assume it will take some time.

    Thanks again for your help!

    -David

  16. drueck
    Member
    Posted 1 year ago #

    So, the archive still wasn't getting uploaded, and I'm pretty sure (like you said) it's either because it's timing out or running out of memory. I looked in the http log on my host and it showed:

    Premature end of script headers: wp-cron.php

    So, I tried backing up just the database and that succeeded, almost certainly because the file is smaller. Given that reality, do you have any recommendations on how to increase whatever parameters are necessary to get it to upload a considerably larger file? Or do you think I'm possibly out of luck on a shared hosting plan?

  17. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    The thing is the plugin should work anyway. I made it stop and schedule a resume before timing out. The only thing that might prevent that from working properly is if safe mode is enabled in PHP, which I assume is, because you're on a shared hosting. I'll have to see how I can work around that.

    Did you get anything in the Backup log this time?

  18. drueck
    Member
    Posted 1 year ago #

    I checked phpinfo and it looks like safe mode is off. And no, unfortunately there still isn't anything new in the backup log. Let me know if there is anything else I can try to get you better info to work with.

    One thing that might be a nice workaround of sorts is a couple more options in the "what to backup" section. If, for example, I could just backup the themes directory and the database, that would get me most of what I would really need... custom modifications to the theme(s) and the database. What's making the backup so huge is the uploads directory where all the images are. Just a thought.

    Thanks again for all your work on this.

  19. agentsully
    Member
    Posted 1 year ago #

    One of my blogs I had to increase the time to 420, but it's working on all my blogs now. thanks.

  20. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    Drueck, I've been trying hard to diagnose your problem and I did find some info.

    First, I see that a lot WP users have this exact same issue on DreamHost. Take a look here: http://wordpress.org/support/topic/backend-errors-premature-end-of-script-headers?replies=28

    Second, according to the first answer here it seems that FastCGI times out. A solution is provided, but I'm not sure if you can implement it on a shared hosting.

    I think I might be able to get around this limitation by generating some output on the page when backing up.

  21. tcsolutions
    Member
    Posted 1 year ago #

    I am getting the same timeout issue "operation timed out after 5000 milliseconds with 0 bytes received (http_request_failed)"

    Not sure if it helps but this error was also on another wp plugin post with the comment

    "If you smush large image (eg. over 900KB), you can get error "Operation timed out after 5000 milliseconds with 0 bytes received". Problem is that WordPress by default timeouts after 5 seconds while doing HTTP requests.

    To fix this issue we need to simply add filter which increases timeout period."

  22. hel.io
    Member
    Plugin Author

    Posted 1 year ago #

    I'm working on a fix for that. Stay tuned.

  23. drueck
    Member
    Posted 1 year ago #

    Thanks, hel.io. I really appreciate you working on it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.