Forum

> > CS2D > Scripts > Server freezes on leave
Forums overviewCS2D overview Scripts overviewLog in to reply

English Server freezes on leave

No replies
To the start Previous 1 Next To the start

old Server freezes on leave

_Yank
User Off Offline

Quote
Grettings, im Sask, most known as fairy, and i came here to ask you guys for help.

My problem is that when my server gets 3 hours or more up, it freezes for 5 seconds when someone leaves.
The server only uses 2 functions to the leave hook and i dont believe that these functions eats to much resources. Here they are :

1
2
3
4
5
6
7
8
addhook("leave","l.clear")
function l.clear(id)
	l.rank[id]=0
	l.rankname[id]=0
	l.color[id]=0
	l.hidden[id]=0
	l.muted[id]=0
end

1
2
3
4
5
6
7
8
9
addhook("leave","sh_clear")
function sh_clear(id)
	local i
	for i = 1,38 do
		sh_id[(id - 1) * 38 + i] = 0
	end
	pl_pt[id] = 0
	pl_lvl[id] = 1
end

And no, the problem isnt on the server low specifications.

PS : To get rid of that i must reset the server. I dont mean something like changemap, i mean, close the cs2d dedicated process and reopen it again.

EDIT : It isnt lagging anymore, i dont know if my server crashed and auto restarted ( I have a script to auto-restart the server on crash ). Will tell you if it backs again.

ALSO : Would like to know if there's a way to split the server logs into parts when it reachs a specific size.
edited 1×, last 11.10.13 04:04:45 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview