Virtual Memory Usage reaches up to 100% Why?

0

One of my client is having cloud hosting. He has problem of high virtual memory usage:

See the current status

Virtual Memory Usage 20 GB / 20 GB (100%)

Physical Memory Usage 1.82 GB / 5 GB (36.47%)

This memory use always increases. Few days ago it was about 10GB. Before that it was about 8GB.

I am not able to understand why this virtual memory use always increases?

Physical memory use is very little and almost constant. Average CPU use is also below 20%.

He has a very low traffic website. May be approx 2000 pageviews per day.

But his site gets shutdown because of this high virtual memory use. I don't have much knowledge about this issue, I am also not a hosting provider, I am his web developer. So I am not able to fix the issue. But if it is related to my application, I will fix it. But I am not able to understand this issue.

UPDATE - This is linux server with cPanel.

Future King

Posted 2019-10-30T15:38:01.773

Reputation: 129

Windows or Linux? – harrymc – 2019-10-30T15:41:55.573

it is Linux Server with cPanel – Future King – 2019-10-30T16:25:40.400

1I can only guess that you have a memory leak in your program. Once physical memory is exhausted, virtual memory is used. – harrymc – 2019-10-30T16:30:03.187

He has total Physical memory of 5GB. But physical memory use never goes up. Its usage is always below 2GB. – Future King – 2019-10-30T16:33:42.767

See: Virtual Memory Usage 20 GB / 20 GB (100%) Physical Memory Usage 1.82 GB / 5 GB (36.47%) – Future King – 2019-10-30T16:34:11.680

This might mean that the OS does not let real memory to become full. I don't know of other ways of filling up the virtual memory except by over-allocation or by opening large files as shared memory. – harrymc – 2019-10-30T16:40:19.060

Reboot the machine. – Mokubai – 2019-10-30T16:57:16.487

@harrymc So it means this is a server issue and not from my php application. Am I right? – Future King – 2019-10-30T17:00:00.117

I would still say your application is indicated, but you can monitor using top(1). See this link. Have you considered increasing physical memory and rebooting periodically to reinitialize memory, as a stop-gap measure?

– harrymc – 2019-10-30T17:09:48.537

Actually I don't have root access. I only have cpanel access to upload files and databases.. That's why I was not able to find the exact cause of problem. But high virtual memory use with very low physical memory use looked strange to me. That's why I asked the question here. – Future King – 2019-10-30T19:14:37.587

No answers