Eu tenho uma instância do EC2 executando o Ubuntu 16.04, que fica sem memória, matando o meu processo mongod.
Fazendo df -h
dá
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 41M 355M 11% /run
/dev/xvda1 7.8G 7.4G 0 100% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1000
assim como meu /dev/xvda1
está cheio. Eu vou no meu '/' ou diretório raiz e faço um
ls -l --block-size=M
total 1M
drwxr-xr-x 2 root root 1M Nov 22 04:49 bin
drwxr-xr-x 3 root root 1M Dec 21 13:14 boot
drwxrw-rwx 3 root root 1M Oct 18 21:01 data
drwxr-xr-x 16 root root 1M Oct 18 20:30 dev
drwxr-xr-x 91 root root 1M Dec 14 01:29 etc
drwxr-xr-x 3 root root 1M Oct 18 20:30 home
lrwxrwxrwx 1 root root 1M Dec 21 13:14 initrd.img -> boot/initrd.img-4.4.0-57-generic
lrwxrwxrwx 1 root root 1M Dec 6 05:03 initrd.img.old -> boot/initrd.img-4.4.0-53-generic
drwxr-xr-x 21 root root 1M Sep 7 19:24 lib
drwxr-xr-x 2 root root 1M Sep 7 19:22 lib64
drwx------ 2 root root 1M Sep 7 19:26 lost+found
drwxr-xr-x 2 root root 1M Sep 7 19:22 media
drwxr-xr-x 2 root root 1M Sep 7 19:22 mnt
drwxr-xr-x 2 root root 1M Sep 7 19:22 opt
dr-xr-xr-x 139 root root 0M Oct 18 20:29 proc
drwx------ 4 root root 1M Oct 18 21:00 root
drwxr-xr-x 23 root root 1M Dec 25 13:55 run
drwxr-xr-x 2 root root 1M Oct 19 06:11 sbin
drwxr-xr-x 2 root root 1M Sep 1 17:37 snap
drwxr-xr-x 2 root root 1M Sep 7 19:22 srv
dr-xr-xr-x 13 root root 0M Dec 25 13:59 sys
drwxrwxrwt 11 root root 1M Dec 25 14:17 tmp
drwxr-xr-x 10 root root 1M Sep 7 19:22 usr
drwxr-xr-x 14 root root 1M Oct 18 20:52 var
lrwxrwxrwx 1 root root 1M Dec 21 13:14 vmlinuz -> boot/vmlinuz-4.4.0-57-generic
lrwxrwxrwx 1 root root 1M Dec 6 05:03 vmlinuz.old -> boot/vmlinuz-4.4.0-53-generic
Se eu somar todo o tamanho do arquivo, não será 7,4 GB. Então o que é? e como eu corrijo isso? Para que ele não transborde e mate meu processo mongod em troca.
Em algumas das respostas. Ele disse reiniciar seu sistema. Após o reinício, esta é a saída.
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 5.6M 390M 2% /run
/dev/xvda1 7.8G 5.3G 2.2G 72% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1000
Eu ainda uso 5.3G de espaço. o que está causando 2 GB para ser preenchido? Como faço para detalhar o problema?
Última edição
Depois de iniciar o processo 2 NodeJS e um processo mongod após o reinício. Em menos de 14 horas novamente fora da memória.
NÃO É DUPLICADO
Eles estavam executando uma instância local do Ubuntu e eu não sou. A resposta que ajuda a detalhar a causa não será executada aqui. Foi parado com o erro (gksudo:3647): Gtk-WARNING **: cannot open display:
. A maioria das respostas aqui requer algum tipo de ferramenta baseada em GUI. Qual é uma limitação aqui. Por isso, esta não é uma duplicata e peço que seja mantida aberta.
EDIT 1
ubuntu@ip-172-31-29-235:/$ sudo du -hcsx .[!.]* * | sort -rh | head
du: cannot access '.[!.]*': No such file or directory
du: cannot access 'proc/4433/task/4433/fd/4': No such file or directory
du: cannot access 'proc/4433/task/4433/fdinfo/4': No such file or directory
du: cannot access 'proc/4433/fd/4': No such file or directory
du: cannot access 'proc/4433/fdinfo/4': No such file or directory
3.9G total
1.8G usr
983M home
363M lib
323M data
249M var
163M boot
16M bin
13M sbin
5.8M etc
Se 3,9 GB for totalmente utilizado.
ubuntu@ip-172-31-29-235:/$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 5.6M 390M 2% /run
/dev/xvda1 7.8G 6.5G 936M 88% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1000
e Used é de 6.5 GB, onde 2,6 GB foram?
EDIT 2
Adicionando saída de sudo lsof | grep deleted
ubuntu@ip-172-31-29-235:/$ sudo lsof | grep deleted
mongod 1272 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1273 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1275 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1276 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1277 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1278 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1279 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1280 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1281 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1282 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1283 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1284 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1285 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1286 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1287 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1288 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1289 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1291 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1292 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1293 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1294 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1297 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1298 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1299 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1300 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1301 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1302 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1303 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1304 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1305 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1306 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1307 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1308 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1309 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1310 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1311 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1312 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1313 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1314 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1315 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1316 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1317 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1318 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1319 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1320 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1321 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1322 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1323 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1324 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1325 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1326 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1327 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1328 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1329 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1330 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1331 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1332 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1333 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1334 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1335 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1336 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1337 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1338 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1342 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 1753 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 2499 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)
mongod 1272 2500 ubuntu 4w REG 202,1 2727852655 160748 /var/log/mongodb/mongod.log (deleted)