M
M
multiscripter2017-05-25 12:39:35
System administration
multiscripter, 2017-05-25 12:39:35

How to find the cause of the server memory being 100% full?

Hello everybody.
Such a problem:
There is a vps on Debian7 with 12 GB of ram.
It has nginx/1.2.1, Apache/2.2.22, PHP 5.4.45-0+deb7u4, MySQL 5.5.49-0+deb7u1 and 5 sites with a total traffic of about 23,000 per day.
From time to time, 1-2 times a day, the ram is filled to 100% for 5-10 minutes.
Attention, the question is:
How to find the cause of the server memory being 100% full? Is it possible to at least write something like an htop screenshot to some log file?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sim3x, 2017-05-25
@sim3x

www.linuxatemyram.com

I
Ilya, 2017-05-25
@glebovgin

Good afternoon.
The result of a simple top can be written to a file
-n - number of iterations
-b - batch mode, just for writing data to a file.

Z
zooks, 2017-05-25
@zooks

Most likely Apache. See atop for details.

U
un1t, 2017-05-25
@un1t

atop can write logs, and you can use them to see the load of processor and memory by process at any time.
I didn’t set up how to set up for writing, the hoster has it set by default
, but you can read it like this
atop -r /var/log/atop/atop_20170519 -b 20:45

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question