Why does DLLHOST.EXE take all my memory and/or CPU?
COM Objects
Since DLLHOST.EXE keeps references to your COM objects, it may be that these objects have memory leaks. Pore through your custom objects and make sure you release all references. If you are using C++/ATL, make sure to use "." as opposed to "->" when destroying pointers. If you are using Visual Basic, make sure that you have read KB #264957, KB #281630 and that you have set Retain in Memory and Unattended Execution. If you are using a third party vendor's object, check their web site to see if they have released any patches to fix memory leaks.
If you are uploading large files with ASPUpload, for example, see PS01041741 for suggested fixes.
Data Access Components
Sometimes this can be caused by MDAC components - either by poor implementation, a faulty install, or a true memory leak in the component. Eliminate the possibilities by getting the most recent version from MDAC Download Page.
ASPTrackThreadingModel
One reason could be that your Metabase has a setting of 0 for ASPTrackThreadingModel. For optimal performance, in IIS 4.0, this setting should be 1. If you are running IIS 5.0, you shouldn't adjust this setting.
To verify / solve this issue, download the Metabase editor (MetaEdit 2.2) from KB #232968.
Once it is installed:
- Launch the editor (from the Administrative Tools menu).
- Expand 'Schema'
- Expand 'Properties'
- Highlight 'Defaults' and scroll for ASPTrackThreadingModel
- Double-click that key
- if Data says 0, change it to 1, click OK, close the editor, reboot.
Too Many Applications Perhaps you simply expect one server's resources to handle too many web sites / applications.
Bonehead Mistakes Yes, we've all made these. Before you go opening a ticket with Microsoft, make sure your code doesn't look like this:
<% Dim i i = 1 Do While i < 10 Response.Write "I'm going to steal your memory." Loop %> |
Other examples are very large loops (e.g. for i = 1 to 10000000000), forgetting to close / set objects to nothing, circular references, forgetting rs.movenext within a do while not rs.eof / loop construct, recursive functions, returning massive amounts of data from SQL Server or Access to an ASP page, storing ADO objects in the session or application objects...
Still haven't solved it? Well, you could use performance monitor to at least narrow down the application(s) causing the problem. Under Internet Services Manager, try changing the application protection under Internet Services Manager to High (isolated). Right-click the Default Web Site (or the troublesome application), choose Properties, and on the Home Directory tab, change the application protection option. Hit Apply, OK, exit ISM and try and reproduce the problem. This may take some experimentation.
If you have several COM objects and you can't narrow down which is causing the problem, put each in its own application, and wail on each one (in a realistic environment) until you reproduce the problem.
See
KB #253706 for more information on tracking down memory leaks.