Unknown script-related crashes
#1

I'm not sure this is the right section to post this, but since It doesn't seem to be a server bug it must be something with my gamemode.
My problem is this: basically the server crashes when 5 or more people are cramped together in a small area. Now, I'd like to make the following premise:
I'm using "printf" calls to log every command in onplayercommandtext, I also log everytime a player enters a checkpoint and also the database update routine which is called every now and then (about 2 minutes), and updates some stuff to the database such as property data, players etc. Now, many of you might think this is crashing the server, but let me explain how this works:

1 - the updating routine is called by a timer every 2 minutes and only updates 10 houses and 10 businesses at once in order to reduce crashes (i used to have it update hundreds of properties without crashing, but i just thought it was a good idea to optimize it). Plus, players and properties are never updated at the same time, I got some "GetTickCount()" checks inside the world cycle, some things are only updated every 2 cycles or so (meaning every 4 minutes), that way , the amount of things that are updated in one cycle is reduced and everything runs smoother .

2 - If this is the reason because the server crashes, why does it happen only when 5 or more people are close to each other? It doesn't crash immediately, it takes some time, like 10 minutes for the server to crash



So IMHO, it cannot be the world cycle, and it cannot be a command as every command is logged before it is executed, so it is easy to detect command-related crashes.

It can't be a checkpoint, as every checkpoint entered is logged.


It cannot be a player loggin in, as everything that happens within the logging session is logged as well.


The streaming distance in my server.cfg is 150.0 , the update rates are the default ones (meaning 40, 80 etc).

My server runs on a UBUNTU LINUX 10.0 VPS, and when it crashes it never gives me a segmentation fault, it just crashes without any particular error. I fixed the crashes that used to give me a segmentation fault error on the command line.
The hardware specs are more than 1 gb of ram, 2 ghz , which should be enough not to make 5 people crash. Also my script doesn't seem to consume much ram, as it seems running at about 300-400 MBs

I cannot show the script, I just wanted to know if it is a common problem if servers crash when people are close to each other. The only thing that could be related to this, i think, is the onplayerkeystatechange and onplayerupdate, both attempt to detect a pressed key (fire) because I need it for my increased damage script. No one seems clicking when the server crashes and plus the script only makes complex calculations only if many conditions match: you must have a specific weapon, the target must be streamed, etc. Plus nothing happens if you don't have any weapon: if you're unarmed it won't even bother making the calculations and I would notice it if someone was shooting


Is there anything I'm missing besides onplayerupdate and the world cycle timer ?
Reply
#2

I know this is not easy thing to help with, also due to the lack of detailed information .I'd like to say that the world cycle calls are logged as well, so it should show up when the server crashes.

sorry for the double post, i just don't think it would appropriate to post another topic with the same title just because it ended up on the 5th page without any replies
Reply
#3

Have you tried this?

https://sampforum.blast.hk/showthread.php?tid=262796
Reply
#4

thanks man! I'm sure that will be helpful and more than enough
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)