🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2681

TCPServer Out of memory exception

#2681
From: Raffaele Pantaleoni
Date: Mon, 06 Feb 2006 10:06
39 lines
2013 bytes
Hi to all,
I'm working with:
BCB 6 Enterprise (updated)
Windows XP Professional SP2 / Windows 2000 Professional
Indy 9.

I wrote two applications, a client and a server using Indy TCPClient and
 TCPServer.

During runtime I got on the Server OnExecute event an "Out of memory"
exception while trying to do a ReadLn, code follows.

void __fastcall TForm1::tcpServerExecute(TIdPeerThread *AThread)
{
  AnsiString Msg;
  //Get the text sent from the client
  try
  {
    Msg=AThread->Connection->ReadLn("",5);
  }
  catch (Exception &exception)
  {
    ExceptionsLog("tcpServerExecute",exception.Message);
  }
}

From time to time this error pops up. It takes several hours to come
out, more than six hours. Moreover it seems to come out when the channel
is idle (no communications between the client and the server).
The system memory is still avalaible when the error come out, and the
process itself hasn't growth in memory size.

All the tests were made on the same pc (address 127.0.0.1). The error
comes out either if I connect a telnet to my server or my client
application or both of them at the same time.

Any idea?
Thank you
Raffaele Pantaleoni
Technical Details
Message-ID: <43e71eee$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bcfef8d7a8434913,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 06 Feb 2006 11:06:56 +0100
From: Raffaele Pantaleoni <pantaraf@yahoo.it>
User-Agent: Mozilla Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TCPServer Out of memory exception
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.94.223.190
Message-ID: <43e71eee$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1139220206 62.94.223.190 (6 Feb 2006 02:03:26 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail