New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map Server keeps on crashing after a few hours #2359
Comments
My server also hangs up randomly, it did not have that problem in the old days. |
@admkakaroto yes huhu 👎 i hope this will be fixed soon! |
I'm not sure how you expect the devs to fix something if you don't actually tell them what's wrong. If your server is crashing, we need the error message/core dump. The devs are not a team of crystal balls. |
I'll generate the error and post here. |
Maybe related: #2355 Did you execute a |
@Akkarinage ill get the error code and pst it here right away |
@Jeybla nope.. it is happen that i notice it will consume ram bit & bit until to the max. |
unsure ,but this ever happened on my server. it caused by set npc variable on your custome script, maybe related to #1205 and https://rathena.org/board/topic/93054-memory-usage-by-script-vars/?tab=comments#comment-246980 hmm, overloop? |
So @Valorro and @Mikegyver confirmed that the server runs out of memory and crashes. We should quickly find the cause of it, since it's a critical bug. @Valorro I don't think that has anything to do with the NPC scope. I still would recommend to prefer NPC variables rather than global vars, because you can quickly run into side effects. Also #1205 is already fixed since dce6ff1 (the additional allocation got removed, so there shouldn't be a new memory leak because of that commit). |
i use the same client and i run my Linux pc all the time and the i don't stop the server atall |
i guess u git has not affected by this map-server crash problem. seems to be this map-crash problem happen on more newer commit from urs. like @admkakaroto said. My server also hangs up randomly, it did not have that problem in the old days. |
I have an emulator of the month 02 (February) and it does not have this problem, I have been updating it manually, but without the package overhul, it is running fine but totally out of date, but it does not have this crash problem. |
@Jeybla hmm i see, im really sorry cant reproduce the core problem, this issue happen like 1-2 month ago and everything fine now no more crash after i did changes on custome npc script var, maybe it has no correlation at all. need futher test |
@judegimeno is this image the error you get when the map server crash ? |
@sader1992 nope.. that is the image when he execute run in gdb map-server. after run in gdb map-server, he execute bt full and this is what happen when the server crash... look in the red box. |
@Mikegyver yours was killed with SIGKILL which cannot be handled/implemented by any application. Could it be that your operation system has some auto process killing activated when something happens? |
@Lemongrass3110 i'm not sure. but i'm using same setup on ubuntu 14.04.5 & 16.04.3. this only happen on ubuntu 16.04.3 as i mentioned to u on discord earlier... maybe the OS itself shut down the process as ram usage almost full
i'm running again gdb map-server. i'll write another finding.. either get same result on above screenshot or not. |
Looking at your screenshot it looks like you intentionally killed the process this time. This time you got SIGINT which is issued by CTRL+C. Also looks like this because you have |
@judegimeno |
@Lemongrass3110 isn't CTRL + C is to stop.. then i execute c (which continue back)? http://web.eecs.umich.edu/~sugih/pointers/gdbQS.html
|
On git 6f98508 However running rAthena + SQL database on the same system only having 1gb of ram available in total sounds like you're saving money on the wrong spot. |
My dedicated server has 32GB of RAM and even then the server randomly crashes. |
Check the updates which took place inbetween the working and crashing git and try to find out if it may be related to customizations such as scripts or core changes. And post crashdumps so the devs can see what's going on. You could also check if you can reproduce the crash on a clean rathena. Mine has a lot of customs scripts and core changes yet i don't had this issue as of yet. |
this is report on clean rAthena running on ubuntu server 16.04.3 64-bit. the only changes had been done are modifying the IP & mysql database credential. from time to time we can see the VPS ram usage getting increase bit by bit. and these following images done un-comment the ShowMessage in the src/common/malloc.c as requested by @Lemongrass3110 on our discord conversation. the purpose want to see once it runs we should see where it happens. but somehow nothing is shown eventho have un-comment this ShowMessage. anyway, thanks to @Lemongrass3110 coz willing to spend his time on this issue eventho he is at work. such a very concern dev. xD EDIT: @Everade this is on clean rA. |
|
@Jeybla. Yup. Correct. But once the map-server is killed.. the ram-usage fall down & not increase bit by bit. It just keep increasing when map-server is running. That is the most weird thing. Or even when the vps is idle. Without starting athena. The ram consumption pretty stable & static.. just when the server is started. The ram usage getting increase time to time. |
as i mention on above. the MySQL ram consumption is pretty stable & static (which means doesn't keep increasing ram usage) & below are the screenshots. taking interval of 1 hour gap time.. we can see from the screenshots below, on idle, the MySQL ram consumption just increase 1MB. as i mentioned earlier, ram consumption keep increasing only when rA is running (in this case, MySQL ram consumption). it is more likely the record/statement that is not being freed. maybe that's the reason why the ram consumption keep increasing until it causing the OS ended up with sending a SIGKILL event to the rA map-server process. Linux OS - Ubuntu Server 16.04.3 64-bit |
server hash 1fc0ed6 and today after more then 12 hr and if we count the ones that not 2017-06-14bRagexeRE |
@sader1992 i guess u not read carefully.. i didn't mention somewhere on above map-server is eating the RAM. in fact this has been cleared by @Jeybla
as in my above screenshot. the MySQL is eating the RAM. and. it happen when rA is running. i already attached 2 screenshot on above. when vps is idle. the MySQL ram consumption is at steady state. only when rA is running, MySQL getting consume a lot of RAM consumption. and i also did myself here
and also i have state my linux distro & what MySQL version i'm using. this is on VPS running on ubuntu server. while your running on Linux Desktop version. since u don't have issue on this, i politely would like to ask u don't interfere.. what i posted here, just want to update the issue thread. i already address this to @Jeybla & @Lemongrass3110 via PM at discord. |
@Mikegyver you want to fix the problem or just want everyone to say there is a problem ?? for the operating system i would ask you to reinstall ubuntu (server) with all the tools rathena needs and re try again :P that if you want to fix the problem and post everything about your operating system if you got the problem again to help fix it (it's not a private post) my system info: |
@sader1992 i wouldn't post here if i have no problem after rebuild the vps.. but even after rebuild the vps the same problem ever persist.. in fact i have rebuild the vps for 8 times. and even using aws & digital ocean vps.. and yet the same problem persist.. well.. since u said no error.. why not u grab either aws or digital ocean vps & make a try... and let me know either u have that problem or not.. |
|
This comment was marked as abuse.
This comment was marked as abuse.
@Anacondaqq u might have the point... coz on vps.. it doesn't have swap partition (which act like virtual memory) unlike being installed on computer or VM... (which we been asking on allocation on size for swap partition).. most of the vps provider just making into real memory.
is there any chance by these commands, we can specific on partition size for the swap? |
@Mikegyver that's the first step in @Anacondaqq's list. The |
maybe its MYSQL 5.7 features? default table open cache on 5.1 = 64, on 5.6 = 400, now 5.7 = 2000 |
We have this problem also in our server , does instance variable ' affect it? |
=/ |
@Mikegyver and @judegimeno were able to fix the issue by adding a swap space. Thanks to @Anacondaqq for mentioning it. 1 GB Ram is just not enough to run rathena (with mysql and flux). |
Description of Issue:
Modifications that may affect results: I only added npc on the npc custom folder and even i restart the server with no npc its still the same. and change the welcome message as well. and turn off the git version welcome message.
The text was updated successfully, but these errors were encountered: