Microsoft Developer Network > Forenhomepage > Windows Communication Foundation > tcp channel time out on connection pool
Stellen Sie eine FrageStellen Sie eine Frage
 

Beantwortettcp channel time out on connection pool

  • Donnerstag, 2. Juli 2009 12:52Serge Calderara TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    dear all,

    I havae a service which is accessible through tcp protocol and after some time, the service gets closed due to the following message :
    "A connection has exceeded the idle timeout of this connection pool (00:02:00) and been closed"

    Then of course m next service call is failing

    How this pool is really working for that protocole ?
    Do we have to increase the pool size or pool time out ? doe sthis will help in all situation  ?

    What cause the pool access to be idle ?

    Thnaks helping on bets way to solved that issue

    regards
    serge

    Your experience is build from the one of others

Antworten

Alle Antworten

  • Freitag, 3. Juli 2009 21:09Lars WilhelmsenMVP, ModeratorTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     Beantwortet
    Hi Serge,

     I think you will have to tweak the MaxConnections & IdleTimeout parameters of the NetTcpBinding.

     Some more information:

     http://kennyw.com/indigo/181
     http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d4834cb3-f937-40cf-898b-3eabbd31078e/

     --larsw

    Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/
  • Freitag, 3. Juli 2009 21:24Serge Calderara TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    still did not real catch the MxConnection for tcp channel, does it means that it needs to be as small value as possible ?

    How do you estimate the number of maxConnection then ? based on which factor ? my finger :-)
    I do not know in qdvqnce how many client conenction I will have on my seervice .

    thnaks fo clarification
    serge
    Your experience is build from the one of others
  • Mittwoch, 8. Juli 2009 10:24Steven Cheng - MSFTMSFT, ModeratorTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Hi Serge,

    Regarding on the following article Lars refered:

    http://kennyw.com/indigo/181

    it explains that the "MaxConnections" limit actually means the max pooled connection instance(in the TCP connection pool).

    As for how we should estimate and measure the max setting, I think you can consider the following things:

    **how much is the throughput or concurrency requirement of your service?

    **Will it frequently process large number of concurrent clients(connections) or just ocassionaly?

    If the answer is frequently, it would be better to enlarge the MaxConnections(pool size) so that the connection establishing time will be greatly improved. Otherwise, you can keep it at low value since it ocassionaly handle large number of concurrent clients and does not need to keep many live connections in pool.







    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Mittwoch, 8. Juli 2009 12:54Serge Calderara TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Does this maxConnection pool definition can cause a lack of memeory in case we set them to big ?

    Your experience is build from the one of others
  • Mittwoch, 8. Juli 2009 13:11Serge Calderara TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    So based on the link http://kennyw.com/indigo/181 I understand it so that the mxConnection is the number of channel in the pool that we want to keep right ?

    by not knowing this, for my application this value is set to 32 because I have though is was linked to max conenction to the service.

    So base on my 32 setting, it means that event if I clos my channel after use, it weel keep at mach 32 live channel in meemory, is that corrcet ?

    Does this count cause after a while a memory leak at client side ?

    PS : note that all my services and client application runs on teh same machine wihich has 4gb Ram and Server 2008, so single sytsem ressource are used.

    thnaks for help
    regards
    serge
    Your experience is build from the one of others