Thanks for tracking this down. Would you mind filing a few bug reports
on SF? Thanks again!

Matthew Krenzer wrote:

 > Although very well documented, it looks like the ConnsPerThread
 > configuration parameter is unimplemented.  I've checked in 3.4, 3.5 and
 > 4.0beta8.  Can anyone confirm this?  Is there any special reason why
 > it is
 > not implemented?
 >
 > Now on to the real questions . . .
 >
 > We have an aolserver here that is setup as an xml-rpc server.  It
 > currenlty
 > handles about 200000-300000 requests a day so it deals w/ twice that
 > number
 > of xml documents each day (request and response).  Currently we need to
 > restart nsd about once a week because it runs out of memory.
 >
 > I've gone through the hassle of loading everything into purify, and even
 > though the process grows to about 150MB, it reports only about 20k of
 > leaked
 > memory.
 >
 > After a lot of debugging I've come to the following conclusion:
 > It looks like ns_xml doc delete $id does not free _all_ resources used
 > for
 > that document.  Some information is kept around for cleanup later.
 > Under aolserver 3.x (and later I assume) this cleanup in handled by a
 > call
 > to Ns_TclRegisterDeferred which will not get called till the
 > interpreter is
 > cleaned up (which may never happen).  Under previous versions of
 > aolserver
 > this cleanup was called by executing an ns_atclose command which would
 > execute once the connection is closed.  (look for the #ifdef
 > NS_AOLSERVER_3_PLUS line in the code).
 >
 > So, under v3.x since the interpreters are not deleted till shutdown, the
 > cleanup handlers don't get called and the process ends up using a ton of
 > memory - non of which is reported as leaked because it cleans it up
 > when the
 > server shuts down.
 >
 > I've changed the code to call Ns_RegisterCleanup instead of
 > Ns_TclRegisterDeferred, but that really freeked out the system,
 > eventually
 > resulting in segfaults.  So then I changed the code to do what it did
 > in pre
 > 3.x versions of aolserver and everything seems to be peachy-keen.
 >
 > Now that the disertation is over . . . does any of that make sense?  It
 > doesn't seem like I should have to schedule the at_close to happen (or at
 > least there should be an equivelent C call), and I would think calls to
 > ns_xml doc delete should cleaup _everything_.  And what's with the
 > un-implemented connsperthread anyway????  Or am I completly wrong here?
 >
 > One other note.  We've been using libxml 2.4.22 forever and tried to
 > upgrade
 > to 2.5.7 - but aolserver seems to segfault on invalid xml documents under
 > 2.5.7 and it has something to do with the ctxt->_private variable
 > being used
 > to store a pointer to the interpreter.  Is it possible 2.5.7 uses this
 > field
 > in a different way?
 >
 > Thanks for any information,
 > Matthew Krenzer
 >
 >
 > --
 > AOLserver - http://www.aolserver.com/
 > To Remove yourself from this list: http://www.aolserver.com/listserv.html
 > List information and options: http://listserv.aol.com/
 >

--
Nathan Folkman
Technical Mgr., AOLserver/NPE/NES
Web Services and Publishing


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/

Reply via email to