0

I have a Debian VPS running node.js socket.io server + nginx + mysql +php5-fpm and the socket server seems to freeze with no messages and no errors. I noticed that the memory usage grows over time but can't seem to find the reason. I kept track of memory usage with 'top' command and that's what I found, but the memory didn't increase while I was checking.

top - 09:31:08 up 10 days, 13:07, 2 users, load average: 0.24, 0.43, 0.41 Tasks: 47 total, 1 running, 46 sleeping, 0 stopped, 0 zombie %Cpu(s): 14.5 us, 2.0 sy, 0.0 ni, 83.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 2097152 total, 857692 used, 1239460 free, 0 buffers KiB Swap: 524288 total, 22772 used, 501516 free, 482564 cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

13585 root 20 0 972m 259m 10m S 16.6 12.7 3:28.32 node

4702 mysql 20 0 529m 81m 8032 S 15.6 4.0 114:48.94 mysqld

13681 www-data 20 0 141m 7812 4428 S 0.3 0.4 0:00.99 php5-fpm

13683 www-data 20 0 141m 7560 4440 S 0.0 0.4 0:00.35 php5-fpm

13682 www-data 20 0 141m 6340 3336 S 0.3 0.3 0:00.40 php5-fpm

13375 root 20 0 71232 3632 2812 S 0.0 0.2 0:00.09 sshd

13359 root 20 0 71232 3624 2808 S 0.0 0.2 0:00.05 sshd

1590 bind 20 0 194m 3548 1876 S 0.0 0.2 0:00.21 named

3196 root 20 0 99.7m 2880 2340 S 0.0 0.1 0:00.40 smbd

3198 root 20 0 99.7m 2864 2364 S 0.0 0.1 0:00.40 smbd

24840 root 20 0 99.7m 2848 2396 S 0.0 0.1 0:00.89 smbd

13361 root 20 0 17888 2064 1512 S 0.0 0.1 0:00.00 bash

13377 root 20 0 17888 2060 1512 S 0.0 0.1 0:00.00 bash

2394 root 20 0 138m 1796 336 S 0.0 0.1 0:26.30 php5-fpm

2374 www-data 20 0 80476 1636 688 S 0.0 0.1 10:05.99 nginx

2375 www-data 20 0 80556 1628 688 S 0.0 0.1 10:11.15 nginx

13680 root 20 0 21600 1468 1068 R 0.0 0.1 0:00.15 top

2538 root 20 0 99928 1436 1136 S 0.0 0.1 0:01.81 smbd

1623 root 20 0 109m 1284 600 S 0.0 0.1 0:00.69 rsyslogd

2409 root 20 0 69760 1196 956 S 0.0 0.1 2:51.99 nmbd

2680 root 20 0 21784 1176 660 S 0.0 0.1 0:00.32 screen

13365 root 20 0 21556 1168 920 S 0.0 0.1 0:00.00 screen

13381 root 20 0 21556 1168 920 S 0.0 0.1 0:00.00 screen

2681 root 20 0 17908 1108 820 S 0.0 0.1 0:00.05 bash

2718 root 20 0 17908 1076 788 S 0.0 0.1 0:00.14 bash

2717 root 20 0 21788 1036 628 S 0.0 0.0 0:00.21 screen

1 root 20 0 30172 984 488 S 0.0 0.0 0:00.18 init

4362 root 20 0 4136 720 580 S 0.0 0.0 0:00.01 mysqld_safe

1727 root 20 0 57828 716 464 S 0.0 0.0 0:21.72 sendmail-mta

4703 root 20 0 4044 676 572 S 0.0 0.0 0:00.00 logger

1520 root 20 0 18928 456 328 S 0.0 0.0 0:00.84 rpcbind

2644 root 20 0 98.1m 448 292 S 0.0 0.0 0:00.00 smbd

1768 root 20 0 49892 376 260 S 0.0 0.0 0:00.09 sshd

2373 root 20 0 78372 336 136 S 0.0 0.0 0:00.00 nginx

1842 root 20 0 18836 216 140 S 0.0 0.0 0:01.20 cron

Since I'm new to those things I don't know where I'm messing things up, and I noticed that theres 3 php5-fpm processes as well as 3 nginx's. I'm not sure what to do, and how to stop memory leak, and most important how to track it down because while I stand watching the 'top' results, nothing shows memory growing.

  • What memory leak are you referring to? It's not clear what the problem is. – Michael Hampton Jan 31 '16 at 14:52
  • The server simply freezes after certain amount of time working, it just stops sending and receiving "emits". prntscr.com/9x9ch8 Here's the graphic for RAM use in my VPS – Marciel Fonseca Jan 31 '16 at 17:00

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.