Virtual servers become unresponsive frequently

Hi!

Firstly, thank you for this very good system!

I had my VPS running Virtualmin for 2 years without any issues but about 1-2 months I started having issues.

Initially the websites was getting unreachable due high CPU and memory usage from mySQL service.

I did some changes like increasing virtual memory and changing tables engine from MyISAM to InnoDB also changing PHP from FPM to FCGI.

With this changes the CPU usage problem has gone.

But after 2 days I started having problems with crash in Apache and MariaDB due OOM then I changed the InnoDB pool size and MaxRequestWorkers parameters.

After the OOM problem has gone too but websites always become unresponsive after 1-2 days working fine.

Looking for crashed services I found only this but it’s the same when the websites are working fine.

❯ systemctl --type=service --state=failed
  UNIT                                 LOAD   ACTIVE SUB    DESCRIPTION
● systemd-networkd-wait-online.service loaded failed failed Wait for Network to be Configured

What I can notice now is very low CPU usage (1 - 5 %) when websites are unresponsive.

Sometimes the websites starts work again after restart Apache or reboot but right now even rebooting won’t solve.

Another thing that I can notice is when the websites are unresponsive I can’t access Virtualmin using configured proxy from panel.domain.com:1000 to panel.domain.com. It’s reachable only directly pointing to port 10000.

I have checked some logs and I can’t see anything wrong.

I would like to get some suggestions to find the problem because I don’t know where to look.

Thanks for all help.

Best regards.

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.400
Virtualmin version 7.40.1
Theme version 25.10
Apache version 2.4.52
Package updates All installed packages are up to date

You can tune php-fpm. PHP-FPM Process Caluculator

But it is not certain that is the issue. Look at the logs and processes of what is the cause.

Also what host do you have?

there are hosts that oversell their vps.

Thanks for your answer!

I’m using Namecheap. I don’t think the problem is the host since it was working fine. Also is clear that server is not processing any request since the CPU usage is very low.

Since my last post the websites started responding again with no interference from my side but it will probably stop in 24 - 48 h.

You aren’t using anything like Cloudflare are you?

Thanks for you reply!

I’m not using any service like this.

The thing about asking for advice from experts is that the advise you get might not agree with the preconceived notions that you have.

Service providers don’t always serve you from the same infrastructure, they have to change things all the time, so it your server which was running fine for two years has started crashing and if @lawk suggests that the service provider might be to blame, you should not reject the idea merely because:

Google stealtime.

Thanks for your answer.

I just think that if it’s was a host problem the websites couldn’t come back after a restart on Apache service.

Also the Virtualmin control panel couldn’t be available while websites are down.

Best regards.

Virtual memory can really slow things down. How much ‘real’ memory do you have. A VPS can be tricky because what you are sold isn’t always what you get. Some hosts over sell. In their view they sell you ‘access up to’ some figure. It might be in use by someone else when your system calls for it.

Not saying that’s the case here but this is a starting point since we know you started with memory problems. Also, while Virtualmin has a recommended minimum, it isn’t really enough for robust hosting.

root@main:~# free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       4.7Gi       1.7Gi       299Mi       9.2Gi        10Gi
Swap:          4.0Gi       1.5Gi       2.5Gi
1 Like

Thanks for your answer!

My server is just for personal websites with low traffic.

❯ free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       897Mi       233Mi       190Mi       831Mi       683Mi
Swap:          3.0Gi       789Mi       2.2Gi

When we start to change default setup it’ may be the beginning of problems.

So let’s check it.

  1. Initially the websites was getting unreachable due high CPU and memory usage from mySQL service.

If you really don’t have a lot of traffic can we get the precise complete description of your VPS (Not what Virtualmin say, but what the description of the VPS indicate, because 2Go if its shared it might be the problem), the size of your DB and the traffic you have (If there is only 1 or 2 members it’s fine, no problems, but we need it)

I guess it’s the first VPS offer:

CPU: 2 (No precision about what it is, what it guarantee and they are virtual, so it might be anything)

RAM: 2GO (Might be DDR2)
SSD: 40GO

It’s really not a lot for a VPS (Even personnal). You say 5% of CPU, but it’s what Virtualmin is guessing. Still the 95% remaining might already be taken by some other VPS. More over you said “the websiteS”: 2 might already be a lot there.

I quote the FAQ of Namecheap

What is the difference between a VPS and a VDS?

To put it plainly, a virtual private server (VPS) is a server that’s configured to host multiple servers isolated from one another and using different operating systems (OS) but using the same hardware whereas a virtual dedicated server (VDS) can have their resources like CPU or memory levels reserved solely for their needs.

Namecheap doc if far from clear (II would even say it’s a mess). So it might simply be the problem.

Trying to check their TOS:

https://www.namecheap.com/legal/hosting/aup/

Paragraph 10 and 11 are quite ambiguous. The 11 mentioning VPS doesn’t try to define any kind of guaranteed resources

Kinda ambiguous

I’m on Kernelhost.com and it’s perfect. Extremely professional.

  1. I did some changes like increasing virtual memory and changing tables engine from MyISAM to InnoDB also changing PHP from FPM to FCGI.

It shall be FPM. It’s probably the default for 90% of servers. You shall not change it when you get this kind of problem (So reverse it, because in this case it might be a need to know what’s wrong with FPM on your Server)

  1. With this changes the CPU usage problem has gone.

But after 2 days I started having problems with crash

So it didn’t fix the problem

then I changed the InnoDB pool size and MaxRequestWorkers parameters.

I’m not sure to follow/understand this

  1. Wait for Network to be Configured

You probably already searched there, but in case of:

When you say unresponsive you mean you can not reach the server (Might be the DNS) or you can reach it but then it freeze ?

  1. Most important: What the Namecheap support told you when you reached them ?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.