Memory Usage Spike - Newbie

General support questions
Post Reply
Darran
Posts: 4
Joined: 2018/06/16 13:20:37

Memory Usage Spike - Newbie

Post by Darran » 2018/06/16 13:33:10

Hello everyone,

I really hope this is the right place for this, as I haven't had much luck so far looking for something on the VestaCP end of things, and I'm wondering if it's something that the fine CentOS community could help with. I'm currently running Vesta on CentOS on a cloud server I got through lcn.com. I'm really new to this field but I've been enjoying tinkering around with it. My friend, who runs a woodworking machinery business, also had the same setup through LCN, only a tier up and a big overkill, I think, for his single ecommerce site.

To help pay for my own server, I recently offered to host his site on mine. It happened that his own site occasionally went down with "Error Establishing A Database Connection" from time to time, that could only be remedied by restarting the server, and I hoped that having it on mine might also somehow solve that problem for him.

Unfortunately, it didn't. Every so often the site goes down in what seems like an irregular pattern. Checking the graph, I noticed a big memory spike before it goes kaput. Adding a swap file seems to make them a bit less frequent, but they still come.

I'm not sure what to do, what logs to check or how, and my Googling has only got me so far! I would really appreciate any advice anyone could give.


Many thanks in advance,

Darran


Image
(9:30pm the memory spiked and all sites on server went down. 9:45am I restarted and all back up)

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Memory Usage Spike - Newbie

Post by TrevorH » 2018/06/16 13:36:27

The minimum RAM required to run CentOS 7 is documented as 1GB per core. You appear to have less than that - in fact 768MB is too small to run just about anything.

Please provide the output from uname -a run on the server in question as well as free -m
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Darran
Posts: 4
Joined: 2018/06/16 13:20:37

Re: Memory Usage Spike - Newbie

Post by Darran » 2018/06/16 13:55:07

That sucks a bit, as it came like that :/ I should have 1gb though. I'm not sure why it comes up like that.

uname -a comes up with:
Linux cloud364759-1.lcncloud.com 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:0 5:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
free -m comes up:
#### total used free shared buff/cache available
Mem: 991 728 78 8 184 95
Swap: 2047 299 1748

Darran
Posts: 4
Joined: 2018/06/16 13:20:37

Re: Memory Usage Spike - Newbie

Post by Darran » 2018/06/16 13:57:13

That's at the minute ofc. Here's the graph on Vesta. This ram usage is a little higher than normal though, it'll probably lower if I restart, but still.

EDIT: It might also be worthwhile to mention that his own server did this too with 2GB ram.

Image

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Memory Usage Spike - Newbie

Post by desertcat » 2018/06/18 20:47:34

Darran wrote:
2018/06/16 13:57:13
That's at the minute ofc. Here's the graph on Vesta. This ram usage is a little higher than normal though, it'll probably lower if I restart, but still.

EDIT: It might also be worthwhile to mention that his own server did this too with 2GB ram.

Image
2GB of RAM is also a bit wimpy . You really need at least 4GB. I had a workstation with 3GB of RAM and it was slower than a slugball. I updated it to 6GB and now is quite snappy. It is possible that the reason it goes down that the process times out, or that there is an I/O request that is competing for that memory and the computer dumped the memory. OTOH it could also have something to do with an outage of your ISP and there is not much you can do about that especially if you both use the same ISP.

Darran
Posts: 4
Joined: 2018/06/16 13:20:37

Re: Memory Usage Spike - Newbie

Post by Darran » 2018/06/19 12:31:39

Hmm, thanks for the answer but I don't know about that, you mean to say that at least 4GB is needed to run one ecommerce site with CentOS on a cloud server?

It's just now popped into my mind that this began happening after he switched from his old Magento site to Wordpress. I remember there was some issue with a plugin that converted the database to work with Woocommerce, that didn't go totally smoothly but ended up working in the end. I'm wondering if there's some odd DB issue that's at the bottom of this. Maybe I'll try to export his products and import them into a fresh database and see if that helps.

I'll let you know how I get on. Thanks for the help so far!

Post Reply