NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Alberto on May 28, 2013, 08:15:20 AM

Title: Too many sockets
Post by: Alberto on May 28, 2013, 08:15:20 AM
hi,
How can I avoid this error window?
I'm sure the app is running alone, only one instance per each machine.
See attached pic
Thanks


[attachment deleted by admin]
Title: Re: Too many sockets
Post by: terryd on May 28, 2013, 07:54:35 PM
Just a question out of interest. Why are you running Netrefresh on your webserver?
Title: Re: Too many sockets
Post by: Bruce on May 28, 2013, 09:36:35 PM
What version of windows are you running this on?
Desktop versions of Windows have limits to the number of connections you can have at one time.

How many instances of your program, or programs are you running on this computer?

cheers
Bruce
Title: Re: Too many sockets
Post by: Graham on May 28, 2013, 11:02:37 PM
Hi Michelis

I could be wrong but you may be running into this Windows Networking titbit:

"By default, ephemeral (that is, short-lived) ports are allocated between the values of 1024 and 5000
inclusive using the MaxUserPort parameter. The TcpTimedWaitDelay parameter, which controls the amount
of time the OS waits to reclaim a port after an application closes a TCP connection, has a default
value of 4 minutes."

Sounds like your app is using the NetAuto objects.  If so then..

-   NetClient establishes end-to-end connections with all other available objects
-   It periodically “refreshes” these connections by making new connections

Constantly “renewing” connections eventually causes the PC to “run out” of free ports ie. new ports are being used at a rate faster than windows is releasing unused ports, and this eventually causes TCP/IP on the machine to choke.

Try adjusting your registry with these settings:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"TcpTimedWaitDelay"=dword:0000005a
"MaxUserPort"=dword:0000fffe

Hope that helps
Cheers
Graham
Title: Re: Too many sockets
Post by: Alberto on May 29, 2013, 12:27:08 AM
Bruce:
What version of windows are you running this on?
Mostly XP and W7

How many instances of your program, or programs are you running on this computer?
Only One on each PC

Title: Re: Too many sockets
Post by: Bruce on May 29, 2013, 12:28:36 AM
possibly a good idea to suppress error messages on NetRefresh anyway.
Title: Re: Too many sockets
Post by: Alberto on May 29, 2013, 12:33:17 AM
OK, another Q

I have set the delay to 0 but if I modify a record on one PC two times in a second the refresh in the other PCs shows only the first change. If I do it in more than one or two seconds it refresh both changes.

Anything I can change?
Title: Re: Too many sockets
Post by: Bruce on May 29, 2013, 01:35:33 AM
no, refreshes are "throttled" because otherwise the receiving side can get overwhelmed with work to refresh all the browses.

cheers
Bruce