If you use WordPress and the backup plugin BackWPup, you may have received the dreaded error message: “WARNING: Job restarts due to inactivity for more than 5 minutes”.
You may have pulled your hair out trying to get a completed backup, or even trying to find some help on the subject that actually fixed the problem.
Here’s how to fix BackWPup “WARNING: Job Restarts Due to Inactivity for more than 5 Minutes” error message (with the disclaimer that this has worked for me and hopefully will work for you too).
First off, you need to understand a little about what’s going on when the error occurs. I don’t work for, or have any contact with, the developers of this plugin; this is just what I figured out.
Second off, I think this error only rears its ugly head on low-end shared hosting accounts where your account does not get a lot of the CPU utilization. I don’t get this error on my websites that are on my webserver (I have a dedicated server). But I have gotten it on cheap shared accounts running WordPress.
BackWPup compresses all the files selected in the backup job into a single compressed file. This takes horsepower. If you’re only getting a little share of the CPU on your server, it’s going to take longer for the job to run. The parameters you can adjust in BackWPup are not necessarily labeled with the best wording either; this makes the typical user adjust at least one of them in the wrong direction!
This type of job runs in the background. One thing I’ve noticed on all systems I’ve used this plugin on, is that on long backups, the progress bars that display while the backup is running will show 100%, showing the job’s done when it’s not. Refreshing the page by clicking on BackWPup->Jobs again will reload it and usually I’ll see that it’s not finished.
This is a clue to the dreaded error message. On long backups, the plugin keeps tabs on the job that’s running and will restart it if it thinks it’s stopped. You don’t want that timeout to occur. Setting script timeout setting to a lower number will keep this from happening… the tendency is to want to increase this value, that’s the wrong thing to do.
You can also run in to issues where the script timeout setting PHP (the programming language that WordPress and Plugins use) is set too low.
Things to try 1st:
- Under BackWPup->Settings->Jobs Tab
- Set Maximum script execution time to a low number like 15, experiment with values between 5 and 30.
- In your backup job, if backing up to file, select Tar GZip (Zip will break apart the file for each retry).
Things to try 2nd if the jobs still fail:
- Set php.ini file script timeout if possible
- In a shared host scenario you can’t usually alter the system wide PHP settings, but usually you can tweak some setting by putting a php.ini file in the public_html root directory. If you can do that, you can specify the max_execution_time to 600 or 900 seconds. Don’t get too large with this, 600 seconds equals 10 minutes, 900 seconds equals 15 minutes, don’t set it to an hour for example, this is not just for the backup plugin, it’s for the entire site. Note: if there’s an existing PHP.INI file, don’t overwrite, just edit it and add the required line.
- Example PHP.INI file
max_execution_time = 900;
- Set WordPress config file script timeout if possible
- If you can edit the WordPress config file, wp-config.php, you can add this line to do the same thing (both, either, or neither may work, so put it in both the php.ini file and the WordPress config file)
Hopefully these settings will solve the dreaded : “WARNING: Job restarts due to inactivity for more than 5 minutes” BackWPup error message for you and allow you to get a valid, complete backup of your site.
Before you do anything else, download your new backup and decompress it and make sure it looks OK. If you selected one of the backup compression formats other than Zip, you will need a utility such as WinRAR to decompress it.
Until next time,