Re: debugging web server with lmemdebug

From: John Spaith [MS] (jspaith_at_ONLINE.microsoft.com)
Date: 04/30/04

  • Next message: Xu Jun: "Re: StrongARM CPU with 64MB RAM (post again)"
    Date: Fri, 30 Apr 2004 11:34:03 -0700
    
    

    There is no graceful way to terminate httpdexe.exe. There is another way to
    do what you're trying to do, however.

    Before starting you will need to add this registry value
    [HKLM\COMM\HTTPD]
    ScriptUnloadDelay=DWORD:60000

    This tells HTTPD to only cache ISAPI extensions in memory for 60 seconds
    after their last use, rather than the default 30 minutes. After this
    period, the ISAPI will be unloaded. In practice it may take a few minutes
    before an ISAPI is unloaded, depending on how the timing happens to work
    out.

    What you can do then is to set a check point in LMEM (I believe it allows
    this) after the web server has been running but before it starts processing
    requests and/or loading any ISAPI's/ASP pages you may have. Then run the
    web server pages you're interested in. Unplug the device from the network
    to make sure no one else makes requests after a certain point. Wait a few
    minutes to let any ISAPI's to be unloaded. (HTTP worker threads in internal
    thread pool will take +5 minutes before they terminate. This is not
    configurable, so either wait longer or be aware you will see unfreed memory
    from worker threads.) Then have LMEM tell you everything that has not been
    unloaded since the time you set the check point.

    Hope this helps.

    -- 
    John Spaith
    Software Design Engineer, Windows CE
    Microsoft Corporation
    Have an opinion on the effectiveness of Microsoft Embedded newsgroups?  Let
    us know!
    https://www.windowsembeddedeval.com/community/newsgroups
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. © 2003 Microsoft Corporation. All rights
    reserved.
    "Emil Falcon" <emilfalcon@hotmail.com> wrote in message
    news:effb7e33.0404281408.7256c186@posting.google.com...
    > Hi,
    >
    > I'm trying to debug the Windows CE 4.2 web server in order to find
    > potential memory leaks, using lmemdebug and httpdexe. Only problem is,
    > there's no way of gracefully terminating httpdexe, so I can't get
    > accurate results...Any suggestions?
    >
    > Emil.
    

  • Next message: Xu Jun: "Re: StrongARM CPU with 64MB RAM (post again)"

    Relevant Pages

    • Re: User vs. Worker threads
      ... Drivers are better documented there ... It has all the worker threads. ... Idle threads cannot get terminated, ... although they can terminate themselves by calling ...
      (microsoft.public.win32.programmer.kernel)
    • Re: User vs. Worker threads
      ... It has all the worker threads. ... Idle threads cannot get terminated, ... related to user requests, and, hence, have no user-mode representation. ... although they can terminate themselves by calling ...
      (microsoft.public.win32.programmer.kernel)
    • Re: Handle STOP in a multi-threaded Windows service
      ... > I've written a Windows Service which has ... > - several listeners threads which spawn worker threads based on ... > Does Windows wait for all threads to terminate in a given timespan, ... issuing a Thread.Abort as part of the CLR's orderly shutdown procedure. ...
      (microsoft.public.dotnet.general)
    • how to send control-break or ctrl-c signal to background process?
      ... terminate it. ... control-break, or ctrl-c, it will enter into a graceful termination mode ... to use "kill -9" to kill it... ... or ctrl-c signal then it can output some partial useful information to the ...
      (comp.unix.solaris)
    • how to send control-break or ctrl-c signal to a background process?
      ... terminate it. ... control-break, or ctrl-c, it will enter into a graceful termination mode ... to use "kill -9" to kill it... ... or ctrl-c signal then it can output some partial useful information to the ...
      (comp.unix.misc)