Article View: borland.public.cppbuilder.internet.socket
Article #4597Re: Server Socket Problem
From: Patrick Wong
Date: Mon, 17 Jan 2005 04:29
Date: Mon, 17 Jan 2005 04:29
42 lines
2593 bytes
2593 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:41e63652$1@newsgroups.borland.com...
>
> You said that you are using ICS. ICS does not use separate threads for
each
> connection. Even if it did, though, the server has to call accept() first
> for each connection, and that occurs in a different thread than the ones
> that are created to service the clients after they connect. My earlier
> comments still stand.
>
I have some new findings on my problem. I examined the Win2k event log and
found:
Error EventID 2020: The server was unable to allocate from the system paged
pool because the pool was empty.
Using Win2k Task Manager to monitor the application again I found that the
paged memory pool kept growing, and the number of handles allocated to the
application never decreased. I stepped the client thread execution again
and was sure it called its destructor upon termination, and this in turns
called ICS TWSockt's destructor:
__fastcall TClientThread::~TClientThread()
{
:
:
if(FClientSocket != (TWSocket *)NULL)
{
FClientSocket->~TWSocket();
FClientSocket = (TWSocket *)NULL;
}
}
In ICS source WSocket.pas there is a method
TCustomWSocket.DeallocateSocketHWnd. I can see this is called when stepped
in BCB. And handles can be released. I am not familiar with the Delphi
source. Can you see possible areas that can inhibit handles to be released
during loading test (many client requests are generated simultaneously)?
Regards,
Patrick
Technical Details
Message-ID:
<41eb3f34$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41e50bd0@newsgroups.borland.com> <41e5d556@newsgroups.borland.com> <41e63652$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9670bce8fe2a64d1 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Patrick Wong" <patrickwong@computer.org> Newsgroups: borland.public.cppbuilder.internet.socket References: <41e50bd0@newsgroups.borland.com> <41e5d556@newsgroups.borland.com> <41e63652$1@newsgroups.borland.com> Subject: Re: Server Socket Problem Date: Mon, 17 Jan 2005 12:29:40 +0800 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 203.82.252.252 Message-ID: <41eb3f34$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105936180 203.82.252.252 (16 Jan 2005 20:29:40 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail