Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


VPS shut downs while importing large database
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

VPS shut downs while importing large database

RurikoRuriko Member

The vps has 1GB RAM with 1 vCore @ 3.5 GHz. I'm trying to import a 1GB mysql database through ssh. While it's in progress of importing the database the vps would just shut down after like 5mins and I would have to manually boot it up again. I checked if there were any error logs but none were created. I absolutely have no idea why the vps keeps shutting down when I try importing my large database. Anyone know what could be the problem?

«1

Comments

  • @Ruriko said:
    The vps has 1GB RAM with 1 vCore @ 3.5 GHz. I'm trying to import a 1GB mysql database through ssh. While it's in progress of importing the database the vps would just shut down after like 5mins and I would have to manually boot it up again. I checked if there were any error logs but none were created. I absolutely have no idea why the vps keeps shutting down when I try importing my large database. Anyone know what could be the problem?

    Can we know how much bandwidth does your DC allocates you?

  • Did you check the CPU usage while importing? Is your CPU dedicated or shared? Which provider are you using?

  • @Breezehost said:

    @Ruriko said:
    The vps has 1GB RAM with 1 vCore @ 3.5 GHz. I'm trying to import a 1GB mysql database through ssh. While it's in progress of importing the database the vps would just shut down after like 5mins and I would have to manually boot it up again. I checked if there were any error logs but none were created. I absolutely have no idea why the vps keeps shutting down when I try importing my large database. Anyone know what could be the problem?

    Can we know how much bandwidth does your DC allocates you?

    It's Unmetered @ 100 Mbps and this is on a fresh ubuntu install

  • Some providers implement the auto-check and shutdown VPSes which cause too high CPU/Disk load. I guess it's this case.
    You should open a support ticket with your provider to make sure.

  • You might check AUP about cpu usage. Importing mysql database usually hits 100% usage.

  • @Ruriko said:

    @Breezehost said:

    @Ruriko said:
    The vps has 1GB RAM with 1 vCore @ 3.5 GHz. I'm trying to import a 1GB mysql database through ssh. While it's in progress of importing the database the vps would just shut down after like 5mins and I would have to manually boot it up again. I checked if there were any error logs but none were created. I absolutely have no idea why the vps keeps shutting down when I try importing my large database. Anyone know what could be the problem?

    Can we know how much bandwidth does your DC allocates you?

    It's Unmetered @ 100 Mbps and this is on a fresh ubuntu install

    It looks like your DC is not allowing you to import such a big file because, that might be causing congestion in their network. Please note that unmetered does not mean unlimited.Can you please PM us so that we can discuss & try to resolve your issue.

  • CConnerCConner Member, Host Rep

    Is this an OVH discovery VPS by any chance?

  • @CConner said:
    Is this an OVH discovery VPS by any chance?

    no it's not

  • ratherbak3dratherbak3d Member
    edited August 2017

    Are you sure you're not running out of memory etc?

    Can't see this been bandwidth related. It's only 1GB..

  • rskrsk Member, Patron Provider

    It is not bandwidth related, i am pretty sure.

    The only thing that comes to mind is that if your host/provider implements some of those auto anti-abuse systems on their nodes. If that is the case, if you are constantly using a lot of CPU then your vps is automatically shutdown.

    Hence, try ionice or some other cpu limiting linux utility/script and test by giving the process a lower priority.

  • rskrsk Member, Patron Provider

    Breezehost said: Can you please PM us so that we can discuss & try to resolve your issue.

    If you are not the host in question, why this shameless plug?

    Thanked by 1Aidan
  • I think there was nothing shameless, if we share our technical knowledge publicly, that help somebody out of their hosting issues.

  • emghemgh Member

    @Breezehost said:
    I think there was nothing shameless, if we share our technical knowledge publicly, that help somebody out of their hosting issues.

    He was obviously refering to the need to help him in private.

    Thanked by 1Aidan
  • WebProjectWebProject Host Rep, Veteran

    It sound like the VPS is terminated due to high demand of cpu power overuse, probably limited by 5 min max usage.

  • NekkiNekki Veteran

    @Breezehost said:
    I think there was nothing shameless, if we share our technical knowledge publicly, that help somebody out of their hosting issues.

    I love the inappropriate bolding. I know a guy like you, instead of bold he keeps writing the occasional word in caps.

    It's fucking annoying, and I told him it made him look like a cunt.

    He told me that was rude, so I pointed out to him how I'd got my point across and made an impact without using caps.

    I guess the morale of the story is that sometimes you have to tell people that they're a cunt to get them to stop being one.

    Thanked by 3rm_ MasonR Aidan
  • AnthonySmithAnthonySmith Member, Patron Provider
    edited August 2017

    Change the priority of the tasks, limit the cpu use as much as possible and when you are not generating a load of 20+ for 5 minutes I am sure it will be fine.

    Also move the database over and do the import locally not over ssh no doubt with compression which will be adding yet more CPU time.

  • rm_rm_ IPv6 Advocate, Veteran

    limit the cpu use as much as possible and when you are not generating a load of 20+ for 5 minutes I am sure it will be fine.

    Or just don't use shithosts which randomly kill VPSes for CPU load.

  • AnthonySmithAnthonySmith Member, Patron Provider

    rm_ said: Or just don't use shithosts which randomly kill VPSes for CPU load.

    It is not really a question of 'or'

    Any host on shared CPU will only tolerate so much, by the sounds of it though he is using a host with some sort of node watch monitoring set on pretty ridiculous defaults, either that or he is generating a stupidly high load.

    Sometimes for stuff like this, it is best to use shit/garbage hosts that don't care about the other customers you are impacting.

  • If nothing else works. Break the database file into smaller once and restore in batches

  • WebProjectWebProject Host Rep, Veteran

    @rm_ said:

    limit the cpu use as much as possible and when you are not generating a load of 20+ for 5 minutes I am sure it will be fine.

    Or just don't use shithosts which randomly kill VPSes for CPU load.

    very strange, but such host trying to hold node stable as it's most likely heavily oversold.

    jetchirag said: Break the database file into smaller once and restore in batches

    much easier in this situation:
    1) find better vps provider
    2) change priority of the task, this way it will take longer but it least the VM will be up for more than 5 minutes.

  • CConnerCConner Member, Host Rep

    You may also want to look at getting a cheap dedicated / virtual dedicated server, so you won't have to deal with stuff like this.

  • jetchirag said: If nothing else works. Break the database file into smaller once and restore in batches

    Or use xtrabackup instead of a SQL dump.

  • rm_rm_ IPv6 Advocate, Veteran

    WebProject said: change priority of the task, this way it will take longer

    Changing priority you only modify the priority of it within your VPS. If there are no other tasks running in your VPS, it will still take 100% CPU -- and still make the host shutdown the VPS.

  • @WebProject said:

    @rm_ said:

    limit the cpu use as much as possible and when you are not generating a load of 20+ for 5 minutes I am sure it will be fine.

    Or just don't use shithosts which randomly kill VPSes for CPU load.

    very strange, but such host trying to hold node stable as it's most likely heavily oversold.

    jetchirag said: Break the database file into smaller once and restore in batches

    much easier in this situation:
    1) find better vps provider
    2) change priority of the task, this way it will take longer but it least the VM will be up for more than 5 minutes.

    There are multiple options to solve a problem and I just gave one. For example, you may get a $15/year but it's ain't always works well. For cost, you may want to stay instead moving a an expensive one.

  • WebProjectWebProject Host Rep, Veteran

    rm_ said: Changing priority you only modify the priority of it within your VPS. If there are no other tasks running in your VPS, it will still take 100% CPU

    options cpulimit and nice can be used, more details: http://blog.scoutapp.com/articles/2014/11/04/restricting-process-cpu-usage-using-nice-cpulimit-and-cgroups

    Especially cpulimit can be set to 50% and the task can be achieved.

  • rm_rm_ IPv6 Advocate, Veteran

    WebProject said: options cpulimit and nice can be used

    Yes cpulimit will work, but nice is again, just the VPS-side priority, and will behave like I described previously.

  • ask your provider? for such small database it should not problem

    @jetchirag said:

    @WebProject said:

    @rm_ said:

    limit the cpu use as much as possible and when you are not generating a load of 20+ for 5 minutes I am sure it will be fine.

    Or just don't use shithosts which randomly kill VPSes for CPU load.

    very strange, but such host trying to hold node stable as it's most likely heavily oversold.

    jetchirag said: Break the database file into smaller once and restore in batches

    much easier in this situation:
    1) find better vps provider
    2) change priority of the task, this way it will take longer but it least the VM will be up for more than 5 minutes.

    There are multiple options to solve a problem and I just gave one. For example, you may get a $15/year but it's ain't always works well. For cost, you may want to stay instead moving a an expensive one.

    my $15/y VPS able to import 2 GB DB without problem, so whats your point?
    his provider using autoboot/autoshutdown feature which is annoying, that the problem/culprit

  • WebProjectWebProject Host Rep, Veteran

    sibaper said: my $15/y VPS able to import 2 GB DB without problem, so whats your point? his provider using autoboot/autoshutdown feature which is annoying, that the problem/culprit

    It can be as I have posted before the OP VM provider is overselling node and in order to keep it stable all VMs are terminated if they do use CPU at max for more than 5 mins.

    Thanked by 1sibaper
  • sibaper said: my $15/y VPS able to import 2 GB DB without problem, so whats your point? his provider using autoboot/autoshutdown feature which is annoying, that the problem/culprit

    That wasn't my point. What I mean is my solution was to if there's nothing else works for him and he's not interested in changing node/provider for whatsoever reason

  • HostBasticHostBastic Member, Host Rep

    Most likely the vps is hosted on a oversold server node, and when OP max out the resources for a prolongated period of time his VPS gets automatically rebooted or shutdown.

Sign In or Register to comment.