Backups Crashing Server

I have virtualmin pro.

When a scheduled backup is ran, or if I go to backups and choose backup in background, the backup never finishes. The CPU load keeps going up and up until the server crashes and needs rebooted. If I try to start a second backup before the load gets too high I get an error saying another backup is already running. I am backing up a server with less than 1 MB of data to an ssh server on the same subnet using a local ip address.

If I choose backup now (not backup in background) everything works fine. I have server with several gigs of data that backup fine. Only scheduled backups or manual backups ran in background always fail and crash the server.

hi… what os? whats the ram and cpu? Whats the command you running for backups? is it just virtualmin gui to perform backups or its your own script?

Thanks.

Operating system CentOS Linux 7.3.1611
Webmin version 1.831
Virtualmin version 5.07
Cloudmin version 9.2
Theme version Authentic Theme 18.48
Time on system Sunday, May 7, 2017 4:14 PM
Kernel and CPU Linux 3.10.0-514.16.1.el7.x86_64 on x86_64
Processor information Intel® Xeon® CPU E5-2686 v4 @ 2.30GHz, 2 cores
System uptime 4 days, 9 hours, 14 minutes
Running processes 333
CPU load averages 0.08 (1 min) 0.14 (5 mins) 0.26 (15 mins)
Real memory 12.48 GB total / 3.90 GB used
Virtual memory 3.91 GB total / 619.69 MB used
Local disk space 149.99 GB total / 65.56 GB free / 84.43 GB used
Package updates All installed packages are up to date

I just run the backups from the virtualmin interface.

@richlandhosting

-im sorry, Im on debian my self… cannot help on this one ;( but I think that Real memory 12.48 GB total / 3.90 GB used Virtual memory is somehow wrong…with that much ram you should be on zero regards virtual memory…

That is a different issue I’m going to try and solve next. It’s apache and I think it’s mcrypt from multiple php versions.

yes could be… I have on my server only4 gigs ram real one and 38% is used but zero of virtual ram - you should check your error logs …on mine if that helps - its in /var/log/ folder… good luck with it and I am very sorry to not being able to help you with this, but as I said im debian not centos.

Not trying to spam but just wanted to say thanks for the quick response and advice. I will wait and see if anyone else is having or has had this issue.

Most likely it is not actual RAM or even virtual RAM, but most likely Cache. i will give you an example of another process the does the same thing in Ubuntu. When doing a Large Directory/File copy you can watch it start out fast and get very slow before finished. For example using the file manager if I copy say, 32 GB of data to another drive it will start say at almost 500 Mb/s and before done crawl at 50 Kb/s. So why is this happening you might ask? This would be because the cache is keeping a record of every chunk/piece of data transferred so in the event of an interruption so your drive is not corrupted(it is called Journaling). Perhaps you are familiar with the old windows versions (3.11) when doing a download, if things got interrupted or you lost connection you would have to start over. This used too really upset me when I was downloading huge service packs over a 56K modem. MS DOS did not have Journaling and by widows NT or XP it did.
So the only way may be to break things down into smaller parts. You can backup Virtualmin settings separate from say the actual webpages. Depending on how your email is set up say POP3 you can exclude this from backup as you kinda already have in on a local resource/drive anyway, and that can be backed up usually from the mail client in most clients like Thunderbird or similar.
In the backup “Features and settings” don’t select “Backup all features” but rather select only the most important. You can even select different Features to backup each backup, thus reducing the load and resources need to run the backups. While this may make it a pain selecting what back has what data you will still have backup completed and done. Unfortunately you would have to look into the backup logs to know what is in some of the backups as the backups are not labeled “I got this in me” so to speak.

James

Again thanks for the feedback. This is a virtualmin backup of a virtual server not the virtualmin settings. I can go to the gui, choose backup in background, and it never finishes and keeps the cpu load up until the server crashes. The server could be under 1MB for the backup. If I click backup now it works fine.

By the way CentOS is really Red Hat and Ubuntu was originally Debian, but both started out the same old Linux. Better to think of them as different flavors rather then different OS’s. Most of the basic command line structure is all the same, in all of them. Kinda like windows is the same old thing no mater how you dress it, still insecure and windows is still slow, they just got better at hiding why it is this way.

Another thing you might want to do is run some sort of system monitor while all this is going on. Not sure if I remember what it would be on centOS but on my Ubuntu 14.04 I like to run a Full Gnome GUI along with my server (No server religious comments please as I like it this way). This would never work well back at the original 8 GB. I now avoid all slowness with 32 ournalingGb of RAM and have set up the Virualmin config to opt for using RAM as opposed to using CPU (done in recheck config). Also I know I can play with how Ubuntu runs the second, third and fourth core, i.e. Divi things up, and I monitor it with an indicator always running on my top Panel. In that I have selected to show CPU (all cores), RAM (actual, cache and virtual stacked in one section), The internet connections and the overall resources in the last two sections (4 Total). While I know it also uses resources I have watched and learned very much being able to see what happens when I do something or a process is running. You could use something like the top command, but for me it takes up too much screen. Not knowing more of your setup I don’t know what to tell you to look for that would do something similar?, but you could probably find something like it?

The greatest of these is that I have avoided many lockups and reboots heading things off with a quick kill before things go too far down a path of no return

I guess the biggest factor being over looked and what puzzles me the most is backups work if I click backup now. Just fine. Can be 100 Gigs of data. However backup in background on any server, even under 1mb, crashes the server after a short time of cpu load growing until crash. I have to manually kill or terminate the webmin backup.pl or something like that.