Page 1 of 1
Port Redirect when connection refused?
Posted: Wed Aug 04, 2004 1:50 pm
by pete212
I've been told that the server give the client a
* Unable to connect (Connection refused)
when the port is being used too much at once.. is there a way to get the server to redirect the client to a diffrent port instead of giving a
* Unable to connect (Connection refused)
?
Posted: Wed Aug 04, 2004 2:28 pm
by aquanight
Nope

. "Connection refused" is handled by the operating system - IRCd doesn't ever get a chance to see it (though MSDN says there are things called "conditional accepts"...) .
As to redirecting, just set up multiple ports, and put a note in your MOTD what ports you have available to clients for IRCing, that way they can try other ports if one is being a problem

.
Posted: Wed Aug 04, 2004 2:39 pm
by Syzop
Did you actually experience it? (which OS? what system specs cpu&memory]? how many users? when did it happen? just curious...)
Anyway, yes, it could happen when a lot of connects are coming in and the ircd is unable to accept them fast enough.
There's a "backlog" (kind of incomming connections queue) that is set by default to 5 because some OS's might have problems with higher values.
This is an actual ./Config question on *NIX, if you are using Linux or FreeBSD then you should be safe to increase this quite a bit (eg: to 20, 50).
For windows it seems unspecified, making it also default to 5 (due to LISTEN_SIZE never being specified anywhere), perhaps that could be increased a bit... (see include/config.h, the LISTEN_SIZE define).
Oh and.. in case of an actual attack this might not help much if your ircd is too 'slow' to catch up. But otherwise, for being able to deal with peaks.. it will certainly help.
Posted: Wed Aug 04, 2004 2:51 pm
by pete212
Windows 2000 Advanced Server, its a 800 mhz 512 ram and about 200 users.. and i think if i play with the LISTEN_SIZE it just might fix this problem..
