Hello, Thankyou for helping out here ! I rechecked my code at the point suggested & discovered I was forgetting to close the socket connection properly in the server code. I re-ran without problems after fixing this, Cheers, Kyle. On Fri, 14 Feb 2003, Fons Rademakers wrote: > Hi Steven, > > could it be that on the server side the socket is not properly closed? > I use TSocket to a httpd daemon and close it via standard > TSocket::Close() and there are no problems. > > Cheers, Fons. > > > On Thu, 2003-02-13 at 21:49, stevenkj wrote: > > Hello, > > > > I'm having real trouble right now with getting socket > > communication to work in root (Version 3.03/07 14 August 2002). > > I'm opening tscoket in a loop > > > > TSocket *s = new TSocket("localhost", 9090); > > > > then transfer histograms across the tsocket, > > > > s->Recv(mess_in); > > if (mess_in){ > > if (mess_in->What() == kMESS_OBJECT) > > HTrksPSec = (TH1F *)mess_in->ReadObject(mess_in->GetClass()); > > else { > > cout << "***Unexpected message***" << endl; > > if (mess_in->What() == kMESS_STRING) > > { char errstr[64]; mess_in->ReadString(errstr, 64); > > printf("%s\n", errstr); } > > } > > } > > I then close the tsocket before continuing in another loop iteration. > > s->Close() > > > > ps. I tried s->Close("force"); which didn't work either. > > > > The problem is that root doesn't seem to close the socket properly > > which is causing serious problems with our online monitoring (see mail > > below) & is starting to hurt our trigger comissioning. Has anyone ever > > seen this before, is it a known problem, is there a solution ? > > > > Kyle. > > > > > > ---------- Forwarded message ---------- > > Date: Fri, 07 Feb 2003 17:12:19 -0600 (CST) > > From: Stu Fuess <fuess@fnal.gov> > > To: Kyle Stevenson <stevenkj@fnal.gov> > > Subject: root problem > > > > We looked at file descriptor usage: > > > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1016 > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1018 > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1020 > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1024 > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1024 > > [root@d0ol43 ~]# ls -1 /proc/23124/fd | wc -l > > 1024 > > > > It hits the kernel limit of 1024 files per process max. > > > > where 23124 was the pid of > > ../../bin/Linux2.4-KCC_4_0/l1CTT_examine_x -rcp ../rcp/runol_vsvx_framework.rcp > > > > > > see from netstat -a that CLOSE_WAIT sockets never go away: > > > > tcp 1 0 localhost.localdom:9090 localhost.localdo:39646 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:38110 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:40157 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:39133 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:39389 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:38365 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:41180 CLOSE_WAIT > > tcp 1 0 localhost.localdom:9090 localhost.localdo:38620 CLOSE_WAIT > > > > > > > -- > Org: CERN, European Laboratory for Particle Physics. > Mail: 1211 Geneve 23, Switzerland > E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 > WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480 >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET