Re: ADOConnection fail after a while in TThread



>
> The situation is I don't have a link to the stores all the time. When I
get
> a link I have to download data from them all and then disconnect before my
> link is gone again.

Oh yuk :(

Even so, I would be tempted to eliminate the overhead of
creation/destruction of 150 COM objects at once, and continually, by looping
the threads, even if you are unable to pool and have to keep the whole 150
of them around.

I dont have time to connect to them in sequence. You
> said something about running out of sockets, this could be a cause. How
many
> are available and can it be increased?

It certainly can on Windows 2000. On my box, the default was set at 5000
sockets - I increased it to 30,000. I also reduced the TIME_WAIT from 2 mins
to 30 seconds, (this was the only way I could test my server under rapid
coonect/disconnect load). There are registry entries that you have to
edit/add to change the default. I forget off-hand where these entries are,
but I found them relatively easily on Google.

> I'm running it on a Windows 2003
> server.

I would think that this would have enough sockets available anyway, but you
may want to Google/check this.

Rgds,
Martin



.



Relevant Pages