Ram usage goes up about 40-50mb/day
#1

Hello, my server keeps consuming more and more ram for every day it's on. The ram usage goes up with about 40-50mb/day with is way to much for my vps. My vps is running Centos 6 64bit and my sa-mp version is 0.3e.


Plugins I'm useing:
mysql.dll (BlueG R7) Link
sscanf.dll (The latest version on the first page) Link
GeoIP_Plugin.dll (0.1.4) Link
MapAndreas.dll (Kalcors version) Link
regex.dll (0.2) Link
irc.dll (1.4.2) Link


More info about mysql:
I'm threading all my questions and most of them uses the new cache function that should store and clear the result automatically. The log also says it's doing just that. Anyway the questions I doesn't cache i ether doesn't store result at all (Insert/update/delete questions) or I store and then clear the result manually. The mysql log also confirms this. (I get no out of sync errors and when I look at some questions it says result stored then result freed.)


More info about pvars:
I do only use about 10-30 PVarInt's no strings ever! Also the ram usage is not going down when the player count goes down.. Pvars is reseted when a player quits? Anyway I doesn't think pvars is the problem here.


More info about the irc:
The irc is connected to two channels one admin channel and one regular chat channel. The severs main chat gets sent to the irc channel with is creating a lot of traffic and I mean a lot about (1 msg every 5 sec in average). So if there is a small memory leak in every message sent/received by the irc plugin then this is most likely the problem.



So my question is now where do you think the memory leak is located? Also is it possible to get the ram usage of one single plugin in linux?
Reply
#2

MapAndreas plugin by Kalcor uses 70mb of RAM.

Try to switch to MapAndreas include witch it's more slower than the plugin but it does the same job and you may not notice that big difference it it's speed. The only thing you should care now is RAM.

http://forum.sa-mp.com/showthread.ph...ndreas+include
Reply
#3

Quote:
Originally Posted by Cypress
Посмотреть сообщение
Try to switch to MapAndreas include.

http://forum.sa-mp.com/showthread.ph...ndreas+include

MapAndreas plugin by Kalcor uses 70mb of ram.
Thank you but the ram usage itself is NOT the problem. The server can consume about 200mb if it likes to. The problem is that the ram usage goes up when it's online for a long time. It goes up about 2mb/hour with it shouldn't do. I think it's caused by some sort of memory leak in one of my many plguins but I doesn't even know how to find out with plugin that is leaking or how to fix it.
Reply
#4

Disable all the plugins. After that test it one by one.

Like at 1st enable mysql and check if it does that problem. Then disable it and enable another plugin until you find witch actually makes the problem.
Reply
#5

Quote:
Originally Posted by kikito
Посмотреть сообщение
since when a server consuming 50mb ram is a problem?
If you have a 512mb ram server, or 1gb ram, it's not a problem.
50mb more a day.. It starts at around 170mb and goes up 50mb every day. At the moment it uses 430mb with is a lot more then it should be using. I need to restart the server once every 3 days to keep the ram usage down with is just dumb.

Quote:
Originally Posted by Cypress
Посмотреть сообщение
Disable all the plugins. After that test it one by one.

Like at 1st enable mysql and check if it does that problem. Then disable it and enable another plugin until you find witch actually makes the problem.
You can't just disable plugins.. Then you will get runtime error mission function. and to fix that you need to comment out all the things from the gamemode that uses that plugin.. With I can't do.. For example my server uses mysql for EVERYTHING you can't play without it so there is no way to test if the ram problem is fixed or not. The same goes with scanff and MapAndreas i's impossible for me to disable them without making the server unplayable. I could test to disable the irc, GeoIP_Plugin and regex but it will take ages to just test it and it might not even be them that are causing the problem. Also it might be more then one plugin leaking with makes debugging even harder. Thats why I asked here for help maybe someone knows that one of my plugins is known to leak memory.
Reply
#6

I have this problem too. My server eat +20MB ram every hour, and i dont know why.

My plugins:
- mysql (BlueG)
- streamer
- sscanf
- audio

I think the BlueG's plugin is the wrong
Reply
#7

R6 with mysql works perfectly fine. my memory usage on volt-host is on 3-5% lol
Reply
#8

Make sure also you are using return 1 at the end of all the custom callbacks that use the cache functionality of the mysql plugin (this clears the cache.)

You can try using pmap on Linux to find out which plugin is using the memory.
Reply
#9

Seems like a MySQL issues, before I threaded queries, my servers ram usage would increase by 7mb every hour. You better check your callbacks as h02 said.
Reply
#10

Lol?
How can i detect, which is the [anon] ?

(And i always use return 1 on publics)

Код:
6083:   ./samp03svr
08048000     36K r-x--  /games/samp/server/samp03svr
08051000      8K rwx--  /games/samp/server/samp03svr
08053000   1136K r-x--  /games/samp/server/samp03svr
0816f000    112K rw---  /games/samp/server/samp03svr
0818b000     44K rw---    [ anon ]
08b7f000 209524K rw---    [ anon ]
a1e00000   1004K rw---    [ anon ]
a1efb000     20K -----    [ anon ]
a2000000   2048K rw---    [ anon ]
a2200000   2048K rw---    [ anon ]
a2400000   2048K rw---    [ anon ]
a2600000   2048K rw---    [ anon ]
a2800000   2012K rw---    [ anon ]
a29f7000     36K -----    [ anon ]
a2a00000   1024K rw---    [ anon ]
a2c00000   1024K rw---    [ anon ]
a2e00000   1020K rw---    [ anon ]
a2eff000      4K -----    [ anon ]
a3000000   1024K rw---    [ anon ]
a3200000   1024K rw---    [ anon ]
a3400000   1020K rw---    [ anon ]
a34ff000      4K -----    [ anon ]
a3600000   1020K rw---    [ anon ]
a36ff000      4K -----    [ anon ]
a3800000   1020K rw---    [ anon ]
a38ff000      4K -----    [ anon ]
a3a00000   1024K rw---    [ anon ]
a3c00000   1020K rw---    [ anon ]
a3cff000      4K -----    [ anon ]
a3e00000   1020K rw---    [ anon ]
a3eff000      4K -----    [ anon ]
a4000000   1024K rw---    [ anon ]
a4200000   1020K rw---    [ anon ]
a42ff000      4K -----    [ anon ]
a4400000   1020K rw---    [ anon ]
a44ff000      4K -----    [ anon ]
a4600000   1020K rw---    [ anon ]
a46ff000      4K -----    [ anon ]
a4800000   1024K rw---    [ anon ]
a4a00000   1024K rw---    [ anon ]
a4c00000   1020K rw---    [ anon ]
a4cff000      4K -----    [ anon ]
a4e00000   1020K rw---    [ anon ]
a4eff000      4K -----    [ anon ]
a5000000   1024K rw---    [ anon ]
a5200000   1024K rw---    [ anon ]
a5400000   1024K rw---    [ anon ]
a5600000   1024K rw---    [ anon ]
a5800000   1024K rw---    [ anon ]
a5a00000   1024K rw---    [ anon ]
a5c00000   1024K rw---    [ anon ]
a5e00000   1024K rw---    [ anon ]
a6000000   1024K rw---    [ anon ]
a6200000   1024K rw---    [ anon ]
a6400000   1024K rw---    [ anon ]
a6600000   1024K rw---    [ anon ]
a6800000   1020K rw---    [ anon ]
a68ff000      4K -----    [ anon ]
a6a00000   1024K rw---    [ anon ]
a6c00000   1024K rw---    [ anon ]
a6e00000   1020K rw---    [ anon ]
a6eff000      4K -----    [ anon ]
a7000000   1024K rw---    [ anon ]
a7200000   1024K rw---    [ anon ]
a7400000   1024K rw---    [ anon ]
a7600000   1020K rw---    [ anon ]
a76ff000      4K -----    [ anon ]
a7800000   1024K rw---    [ anon ]
a7a00000   1788K rw---    [ anon ]
a7bbf000    260K -----    [ anon ]
a7c00000   2048K rw---    [ anon ]
a7e00000   2048K rw---    [ anon ]
a8000000   2048K rw---    [ anon ]
a8200000   2048K rw---    [ anon ]
a8400000   2048K rw---    [ anon ]
a8600000   2048K rw---    [ anon ]
a8800000   2048K rw---    [ anon ]
a8a00000   2048K rw---    [ anon ]
a8c00000   2048K rw---    [ anon ]
a8e00000   2036K rw---    [ anon ]
a8ffd000     12K -----    [ anon ]
a9000000   2048K rw---    [ anon ]
a9200000   2048K rw---    [ anon ]
a9400000   2048K rw---    [ anon ]
a9600000   2048K rw---    [ anon ]
a9800000   2048K rw---    [ anon ]
a9a00000   2048K rw---    [ anon ]
a9c00000   2048K rw---    [ anon ]
a9e00000   2048K rw---    [ anon ]
aa000000   2048K rw---    [ anon ]
aa200000   2048K rw---    [ anon ]
aa400000   2048K rw---    [ anon ]
aa600000   2048K rw---    [ anon ]
aa800000   2048K rw---    [ anon ]
aaa00000   2048K rw---    [ anon ]
aac00000   1000K rw---    [ anon ]
aacfa000     24K -----    [ anon ]
aad00000   1024K rw---    [ anon ]
aae00000   2048K rw---    [ anon ]
ab000000   2048K rw---    [ anon ]
ab200000   2048K rw---    [ anon ]
ab400000   2048K rw---    [ anon ]
ab600000   2048K rw---    [ anon ]
ab800000   2048K rw---    [ anon ]
aba00000   2048K rw---    [ anon ]
abc00000   2048K rw---    [ anon ]
abe00000   2048K rw---    [ anon ]
ac000000   2048K rw---    [ anon ]
ac200000   2048K rw---    [ anon ]
ac400000   2048K rw---    [ anon ]
ac600000   2048K rw---    [ anon ]
ac800000   2048K rw---    [ anon ]
aca00000   2048K rw---    [ anon ]
acc00000   1024K rw---    [ anon ]
ace00000   2048K rw---    [ anon ]
ad000000   2048K rw---    [ anon ]
ad200000   2048K rw---    [ anon ]
ad400000   1012K rw---    [ anon ]
ad4fd000     12K -----    [ anon ]
ad500000   1024K rw---    [ anon ]
ad600000   2048K rw---    [ anon ]
ad800000   2048K rw---    [ anon ]
ada00000   2048K rw---    [ anon ]
adc00000   2048K rw---    [ anon ]
ade00000   1024K rw---    [ anon ]
ae000000   2048K rw---    [ anon ]
ae200000   2048K rw---    [ anon ]
ae400000   2048K rw---    [ anon ]
ae600000   2048K rw---    [ anon ]
ae800000   2048K rw---    [ anon ]
aea00000   2048K rw---    [ anon ]
aec00000   2048K rw---    [ anon ]
aee00000   2048K rw---    [ anon ]
af000000   2048K rw---    [ anon ]
af200000   2048K rw---    [ anon ]
af400000   2048K rw---    [ anon ]
af600000   2048K rw---    [ anon ]
af800000   2048K rw---    [ anon ]
afa00000   2048K rw---    [ anon ]
afc00000   2048K rw---    [ anon ]
afe00000   2048K rw---    [ anon ]
b0000000   2048K rw---    [ anon ]
b0200000   2048K rw---    [ anon ]
b0400000   2048K rw---    [ anon ]
b0600000   2048K rw---    [ anon ]
b0800000   2048K rw---    [ anon ]
b0a00000   2048K rw---    [ anon ]
b0c00000   2048K rw---    [ anon ]
b0e00000   1992K rw---    [ anon ]
b0ff2000     56K -----    [ anon ]
b1000000   2048K rw---    [ anon ]
b1200000   2048K rw---    [ anon ]
b1400000   2048K rw---    [ anon ]
b1600000   2048K rw---    [ anon ]
b1800000    984K rw---    [ anon ]
b18f6000     40K -----    [ anon ]
b1900000   1024K rw---    [ anon ]
b1a00000   2048K rw---    [ anon ]
b1c00000   2048K rw---    [ anon ]
b1e00000   2044K rw---    [ anon ]
b1fff000      4K -----    [ anon ]
b2000000   2048K rw---    [ anon ]
b2200000   2048K rw---    [ anon ]
b2400000    988K rw---    [ anon ]
b24f7000     36K -----    [ anon ]
b2500000   1024K rw---    [ anon ]
b2600000   2048K rw---    [ anon ]
b2800000   2048K rw---    [ anon ]
b2a00000   2048K rw---    [ anon ]
b2c00000   1024K rw---    [ anon ]
b2e00000   1024K rw---    [ anon ]
b3000000   1012K rw---    [ anon ]
b30fd000     12K -----    [ anon ]
b3200000   1024K rw---    [ anon ]
b3400000   1016K rw---    [ anon ]
b34fe000      8K -----    [ anon ]
b3600000   1008K rw---    [ anon ]
b36fc000     16K -----    [ anon ]
b3800000   1020K rw---    [ anon ]
b38ff000      4K -----    [ anon ]
b3a00000   1024K rw---    [ anon ]
b3c00000   1000K rw---    [ anon ]
b3cfa000     24K -----    [ anon ]
b3e00000   1016K rw---    [ anon ]
b3efe000      8K -----    [ anon ]
b4000000    996K rw---    [ anon ]
b40f9000     28K -----    [ anon ]
b4100000   1024K rw---    [ anon ]
b4200000   1016K rw---    [ anon ]
b42fe000      8K -----    [ anon ]
b4400000   1024K rw---    [ anon ]
b4574000      8K rw---    [ anon ]
b4576000      4K -----    [ anon ]
b4577000  21456K rw---    [ anon ]
b5a6c000   4948K rw---    [ anon ]
b5f41000      4K -----    [ anon ]
b5f42000  10236K rw---    [ anon ]
b6941000    548K r-x--  /games/samp/server/plugins/audio.so
b69ca000      4K rw---  /games/samp/server/plugins/audio.so
b69cb000    144K r-x--  /games/samp/server/plugins/crashdetect.so
b69ef000      4K r----  /games/samp/server/plugins/crashdetect.so
b69f0000      4K rw---  /games/samp/server/plugins/crashdetect.so
b69f1000     48K r-x--  /games/samp/server/plugins/sscanf.so
b69fd000      4K rw---  /games/samp/server/plugins/sscanf.so
b69fe000     40K r-x--  /lib/i686/cmov/libnss_files-2.11.3.so
b6a08000      4K r----  /lib/i686/cmov/libnss_files-2.11.3.so
b6a09000      4K rw---  /lib/i686/cmov/libnss_files-2.11.3.so
b6a0a000      4K -----    [ anon ]
b6a0b000   8192K rw---    [ anon ]
b720b000     76K r-x--  /usr/lib/libz.so.1.2.3.4
b721e000      4K rw---  /usr/lib/libz.so.1.2.3.4
b721f000     76K r-x--  /lib/i686/cmov/libnsl-2.11.3.so
b7232000      4K r----  /lib/i686/cmov/libnsl-2.11.3.so
b7233000      4K rw---  /lib/i686/cmov/libnsl-2.11.3.so
b7234000      8K rw---    [ anon ]
b7236000     36K r-x--  /lib/i686/cmov/libcrypt-2.11.3.so
b723f000      4K r----  /lib/i686/cmov/libcrypt-2.11.3.so
b7240000      4K rw---  /lib/i686/cmov/libcrypt-2.11.3.so
b7241000    156K rw---    [ anon ]
b7268000   1740K r-x--  /usr/lib/libmysqlclient_r.so.16.0.0
b741b000     16K r----  /usr/lib/libmysqlclient_r.so.16.0.0
b741f000    276K rw---  /usr/lib/libmysqlclient_r.so.16.0.0
b7464000      4K rw---    [ anon ]
b7465000     92K r-x--  /games/samp/server/plugins/mysql.so
b747c000      4K r----  /games/samp/server/plugins/mysql.so
b747d000      4K rw---  /games/samp/server/plugins/mysql.so
b747e000     28K r-x--  /lib/i686/cmov/librt-2.11.3.so
b7485000      4K r----  /lib/i686/cmov/librt-2.11.3.so
b7486000      4K rw---  /lib/i686/cmov/librt-2.11.3.so
b748e000    824K r-x--  /games/samp/server/plugins/streamer.so
b755c000      4K rw---  /games/samp/server/plugins/streamer.so
b755d000     12K rw---    [ anon ]
b7560000   1280K r-x--  /lib/i686/cmov/libc-2.11.3.so
b76a0000      4K -----  /lib/i686/cmov/libc-2.11.3.so
b76a1000      8K r----  /lib/i686/cmov/libc-2.11.3.so
b76a3000      4K rw---  /lib/i686/cmov/libc-2.11.3.so
b76a4000     12K rw---    [ anon ]
b76a7000    116K r-x--  /lib/libgcc_s.so.1
b76c4000      4K rw---  /lib/libgcc_s.so.1
b76c5000    144K r-x--  /lib/i686/cmov/libm-2.11.3.so
b76e9000      4K r----  /lib/i686/cmov/libm-2.11.3.so
b76ea000      4K rw---  /lib/i686/cmov/libm-2.11.3.so
b76eb000    932K r-x--  /usr/lib/libstdc++.so.6.0.13
b77d4000     16K r----  /usr/lib/libstdc++.so.6.0.13
b77d8000      4K rw---  /usr/lib/libstdc++.so.6.0.13
b77d9000     32K rw---    [ anon ]
b77e1000     84K r-x--  /lib/i686/cmov/libpthread-2.11.3.so
b77f6000      4K r----  /lib/i686/cmov/libpthread-2.11.3.so
b77f7000      4K rw---  /lib/i686/cmov/libpthread-2.11.3.so
b77f8000      8K rw---    [ anon ]
b77fa000      8K r-x--  /lib/i686/cmov/libdl-2.11.3.so
b77fc000      4K r----  /lib/i686/cmov/libdl-2.11.3.so
b77fd000      4K rw---  /lib/i686/cmov/libdl-2.11.3.so
b7802000     20K rw---    [ anon ]
b7807000      4K r-x--    [ anon ]
b7808000    108K r-x--  /lib/ld-2.11.3.so
b7823000      4K r----  /lib/ld-2.11.3.so
b7824000      4K rw---  /lib/ld-2.11.3.so
bfca8000     84K rw---    [ stack ]
 total   509588K
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)