• Resolved jnicol

    (@jnicol)


    Hi. Firstly I want to thank you for what is undoubtedly the most full featured free WP backup plugin ??

    I’m having issues on one of my sites where the backup time sometimes exceeds PHP’s maximum script execution time. To get around this I have tuned BackWPup by setting its “Maximum script execution time” option to 120 seconds.

    When I run the job manually everything works fine:

    https://pastebin.com/CF1RD94E

    However, when run as a WP cron there is no mention in the log of my 120s restarts, and the job times out:

    https://pastebin.com/rSSfysTY

    My question is: Is “Maximum script execution time” not honoured for cron jobs? If so, is this by design or a bug?

    WP Version: 3.8.3
    BackWPup version: 3.1.2

    https://www.ads-software.com/plugins/backwpup/

Viewing 11 replies - 1 through 11 (of 11 total)
  • nomely the maximum execution time will use on cron jobs in same way as on manualy starts. Only if you call the script over CLI the execution time setting will be ignored.

    Thread Starter jnicol

    (@jnicol)

    OK, so it sounds like the max execution time should be working for my cron job. Any idea why it’s not?

    In moment not sorry. Can you test the beta Version from https://github.com/inpsyde/backwpup

    Thread Starter jnicol

    (@jnicol)

    Hi Daniel. I tried the latest beta, but had the same results as with the stable version:

    https://pastebin.com/baK05pan

    I aborted the job after the first timeout, but as you can see the 120s max execution time has been ignored.

    Yes, i see it. The Problem is that the Message gets the timout to display and the real restart function not gets the timeout or has a other error tht i can’t see. It is the same function for manual or for cron run.

    If the a chaching plugin installed ?

    Thread Starter jnicol

    (@jnicol)

    I think you are onto something! The sites I’m having problems with are running W3 Total Cache, and with W3TC disabled restarts are happening at the max execution time, and the backups do not timeout.

    Do you have any tips for getting BackWPup and W3 Total Cache to play nicely together?

    However… even with W3TC disabled my cron jobs are now having issues uploading to Amazon S3:

    ERROR: S3 Service API: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.

    Manual jobs still complete without errors.

    Waht for caches of W3TC did you use?

    Thread Starter jnicol

    (@jnicol)

    Page cache: Disk enhanced
    Database cache: Disk

    All other settings at their default value.

    What happend if you disable the database cache.

    Thread Starter jnicol

    (@jnicol)

    I think I have it working.

    What worked for me was to change W3’s Page Cache method from “Disk Enhanced” to “Disk Basic”

    After that I was able to perform a successful cron backup.

    Hopefully that information might be helpful for anyone else whose scheduled backups are timing out.

    Thanks for taking the time to see this issue through to its resolution. Your help is much appreciated.

    I will also lokk what the differen is and if i can improve somthing.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Maximum script execution time: cron vs manual’ is closed to new replies.