NetTalk Central

Author Topic: Too many sockets  (Read 12168 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Too many sockets
« 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]
-----------
Regards
Alberto

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Too many sockets
« Reply #1 on: May 28, 2013, 07:54:35 PM »
Just a question out of interest. Why are you running Netrefresh on your webserver?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Too many sockets
« Reply #2 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

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Too many sockets
« Reply #3 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Too many sockets
« Reply #4 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

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Too many sockets
« Reply #5 on: May 29, 2013, 12:28:36 AM »
possibly a good idea to suppress error messages on NetRefresh anyway.

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Too many sockets
« Reply #6 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?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Too many sockets
« Reply #7 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