PDA

View Full Version : UserSocket


horyfilipe
19.10.2005, 21:10
Did anybody find a solution for this bug? Cant go more than 4hours online 1,3k players average without having to reboot due this bug.

Dave
19.10.2005, 21:17
I have noticed after many hours of testing that mine "seemed" to have in a cycle. its not ranodm. mine used to be every 12 hours user sockets would sky rocket. now its every 6 hours. about same time each day. I have done extensive testing from network stand point but nothing, no errors, not stacked ip's, no log files. so im lost on this one. Im almost tempted to write a program that reboots l2 apps every 5.5 hours so to clear the sockets.

horyfilipe
19.10.2005, 21:52
Yeah yeah its happening same to me.. 12h, 6h or 4h.. its a strange bug cause the sockets doesnt really exists, but to l2server. Maybe some expert HexGuy could see something for us.

For those who want to know more and possible help fixing:

See how it happens:
- you set player limit to 2k
- Players online and usersocket walks together till...
- After 4 hours, you have 1,9k USERSOCKET and 1,2k UserPlaying DECREASING and Nobody can login.

Now the questions:
1) Why does it block login if it didnt even reach 2k player limit? And it doesnt make difference if you put playerlimit to 9999k, players still wont login.

2) Why doesnt l2server lift the ghost sockets? Where are they from? Are they new sockets trying to connect? Are they old sockets from users who have disconnected? Eg: player disconnects but l2server doesnt lift his socket.

3) Maybe its cached related problem? I do explain: When i used to run CACHED on a DIFFERENT machine OTHER than l2server, this issue used to happen in 1 or 2h after serverload. APPARENTLY, its more stable when you run CACHED on the same machine of l2server.


Also, this message is related to this issue: PuserSocket: UserSocket is null

bob1122
19.10.2005, 23:34
Yeah yeah its happening same to me.. 12h, 6h or 4h.. its a strange bug cause the sockets doesnt really exists, but to l2server. Maybe some expert HexGuy could see something for us.

For those who want to know more and possible help fixing:

See how it happens:
- you set player limit to 2k
- Players online and usersocket walks together till...
- After 4 hours, you have 1,9k USERSOCKET and 1,2k UserPlaying DECREASING and Nobody can login.

Now the questions:
1) Why does it block login if it didnt even reach 2k player limit? And it doesnt make difference if you put playerlimit to 9999k, players still wont login.

2) Why doesnt l2server lift the ghost sockets? Where are they from? Are they new sockets trying to connect? Are they old sockets from users who have disconnected? Eg: player disconnects but l2server doesnt lift his socket.

3) Maybe its cached related problem? I do explain: When i used to run CACHED on a DIFFERENT machine OTHER than l2server, this issue used to happen in 1 or 2h after serverload. APPARENTLY, its more stable when you run CACHED on the same machine of l2server.


Also, this message is related to this issue: PuserSocket: UserSocket is null
Its not a 'Expert Hexing Guy' issue....

1) Umm maybe it blocks login cause you were playing around with L2AuthD.... > etc > setting.txt
SocketTimeOut=1
SocketLimit=5
Try chaning 5 (Thats what i have it to) to around 6500... and the timeout to whatever....
btw... 9999k Should tail end and end up leaving you with no players alloud >.<

2) There's so many different ways sockets increase.... also its really really simple to crash servers... but what i have noticed is that only SOME Sockets dont get released.... I rarly have more than 1000 Players, usually it sits between 1-800... Its only certain ones that sit, for example logins dont and php scripts do (Just a example its not true).... I would give more info but its dangerous for servers hehe...

3) Well of course its more stable, your sending it directly to l2server not

Cached > network wire > router/switch/poop > network wire > pc > L2server

it makes a difference :)

bob1122
19.10.2005, 23:48
Oh i should add that, you guys DONT want php/asp/html/irc scripts that update every time the page is generated, thats going to be a big portion of your problems.

tontor
20.10.2005, 11:12
We recently started experiencing this directly after having Windows 2003 reinstalled and the server files restored from backup. The problem is a resource leak, and the socket count is a symptom of that, not the source.

The server continues to accept new connections, but will not process any packets on them or free their sockets, which leads to the high socket count from players repeatedly trying to login. This sounds like the server thinks that it has run out of buffers, yet there is more to this problem.

Some(all?) menu functions in the L2Server window no longer function, and L2Server seems unable to spawn any new windows. This again seems like a resource starvation problem.

I don't think it's a coincidence that this started only after an OS reinstall, a full update, and a restore from our backup, and it seems that horyfilipe has had the same experience with his new server. In my opinion the source of this problem is likey either the OS configuration, or a conflict with patches that previously may not have been applied.

demon
20.10.2005, 11:37
:D :D :D :D :D

Dave
21.10.2005, 01:03
do these setting go unter "settings" in server.ini or just any where?

heres my file.
[Setting]
country=1
UserPathFind=true
WorldCollision=false
ExceptionMailing=false
MailServer=mail.ncsoft.co.kr
AcceptLowerProtocol=true
IOBufferCount=4000
;limit hour for week, (number means hour. 0 means don't use. default is 0)
playtimelimit=0
UserSocketBlockSec=10
autologoutsec=30

Dave
22.10.2005, 00:43
well added your fix but still auth stopped letting ppl login. user sockets still soared. I did however notice today that if you look at running services, idle in min. seem to match open sockets. hhmmmm. But still having this major issue so please help us. I would be interested to know if the ppl having this issue, are those just running more than one server.

top-gear
22.10.2005, 12:13
there is a command //stoplogin I think that shuts down login server. Maybe there is another one that starts the login server without restarting.

Kenster
22.10.2005, 12:15
Yes. But many other things happen when this happens. I noticed it happened when I higher my IO BUffer when I didnt have enough ram. I did 10k, It took 12 hours to happen. Did 11k, took 4 hours to happen, I am not at 8k. We shall see.

Nya-o
22.10.2005, 12:35
We recently started experiencing this directly after having Windows 2003 reinstalled and the server files restored from backup. The problem is a resource leak, and the socket count is a symptom of that, not the source.

The server continues to accept new connections, but will not process any packets on them or free their sockets, which leads to the high socket count from players repeatedly trying to login. This sounds like the server thinks that it has run out of buffers, yet there is more to this problem.


although it's not directly related to l2, but my friend told me that there's a bug in win2k3 with service pack. ~_~ can't explain it very well.....
try searching microsoft.com for this update:
WindowsServer2003-KB898060-v2-x86-enu.exe

that update supposed to fix that kind problem.

i don't know if it really helps, as i haven't experienced that problem, but i think it's worth a try.

[localhost]
22.10.2005, 12:55
there is a command //stoplogin I think that shuts down login server

Command //stoplogin bans player. Am i right?

Attary
22.10.2005, 16:15
well added your fix but still auth stopped letting ppl login. user sockets still soared. I did however notice today that if you look at running services, idle in min. seem to match open sockets. hhmmmm. But still having this major issue so please help us. I would be interested to know if the ppl having this issue, are those just running more than one server.

The same.
BTW, usersocket bug strats on our sever very close on any castle siege begin =)

Eliot
22.10.2005, 17:58
UserSocket problem appears when the applications are overloaded with data. The only solution for this problem is to restart the server or buy better hardware.
On my server with Dual Xeon, 6gb ram, Raid0 15k rpm scsi drives this appears very rarely, after around 44-48 hours of operation. And this is actually normal. This is the reason why NCsoft restarted C1 servers everyday morning.
No .ini configuration will fix this, no patch, or fix known to me.

The period of appearance for this bug is gradual, the more You have accounts and characters on Your server the sooner it will appear. The weaker You have hardware the sooner You will get this.
Most impact on this has memory and hard drives performance.
I tested this because i changed machines for servers serveral times now.

top-gear
23.10.2005, 14:35
do you use l2player and its custom authd or not?

top-gear
27.10.2005, 13:50
:/ just a simple question

Dave
27.10.2005, 15:09
I rebuilt my server using windows 2003. removed all uneccarry protocols and apps. reloaded sql and resetup L2. I have not had this issues. since. I also upgrade to 4gb crucuial memory and sata drives. I believe the hardware is the key. Which I beleive was outlined in this thread. No setting I ever changed made a difference. the hardware/rebuild did.

Validator
29.01.2006, 08:30
actual problem, any solutions?

Skill
30.01.2006, 17:10
[rus]L2 сервер не закрывает Socket если произошел logout PP из за потери связи с сервером (ошибка это сервера ла2 или windows не знаю)
решение:
я для очистки Socket закрываю Fw по порту 7777 потом открываю (дисконект всех игроков и очистка Socket)
тоже не хорошо, но все не рестарт сервера.

[en]L2 The server does not close Socket if has taken place logout PP from for losses of connection with the server (the mistake is la2 server or windows I do not know)
The decision:
I for clearing Socket close Fw on port 7777 then I open (disconnects all players and clearing Socket)
Too it is not good, but all not restart of the server.
Excuse for bad ЕN

horyfilipe
30.01.2006, 18:01
Ehehe if i do as you do, skill, i still keep with about 1200 dead sockets :)

Skill
30.01.2006, 23:07
Ehehe if i do as you do, skill, i still keep with about 1200 dead sockets :)It is necessary to wait for 5-10 minutes after opening port server will correct the counter. (that that vanish not used sockets these are 100 %)

P.S.
Can I depend on type FW. I use TinyFW pro for X64. (in him it is well visible dead socket and not only them :) )

Thalone
02.02.2006, 01:23
Server hard drive setup:
Raid 1

Bottleneck calculation for Raid 1 drives:
I/Os per disk = [reads + (2 * writes)] / 2

Average drive threshold:
~120 I/Os

Our average drive read I/Os:
1 - 2

Our average drive write I/Os:
240 - 350

I/O = (1 or 2) + (295 average * 2) / 2 = 296 I/Os

296 I/Os - 125 I/Os = +171 I/Os over threshold.
That quote is from Shawnmb who we merged with this week ( I run es-l2.com)... what we are doing now is getting a dedicated sql server with high performance hd's...

so eliot is right, its your hardware