Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory problems/Memory leak

Status
Not open for further replies.

d3vil

IS-IT--Management
Jun 4, 2001
3
US
Memory problems/Memory leak

Hi, there is a problem I have at work with a server that seems to report inaccurate memory or possibly have memory leaks, and am wondering if anyone can help me with identifying the problematic application or problem.

The server has WinNT 4.0 Server, with 4 cpus, 1 GB of ram, and the pagefile is split into 3 files with a total of 1.8 GB.

It runs a number of processes/apps such as MS Excel 97, MS Access 97, MS SQL server 7.0 with SP3, IIS/Cold Fusion 4.0, and a few misc AT/scheduled jobs.

Even though the ram usage reports approximately 750 MB of used ram (550 MB free) and 8 MB of used paging file space (1.72 GB free), I get errors such as the following when trying to open MS Access, "There isn't enough memory to perform this operation. Close unneeded programs and try the operation again." and also "Initialization of the dynamic link library C:\Winnt\system32\user32.dll failed. The process is terminating abnormally." when trying to login to the server. Task manager reports a lot of free memory, but Access still has problems running because of no memory? Are any of these programs having memory leaks? If so, which ones could be fixed by an upgrade patch/SP? I am not sure what to make of it, and any help would be greatly appreciated.

BTW, This is supposed to be a stable server and should only be scheduled reboot so I can't reboot that often.

Thanks,
Alex
 
Here an article from the ACCESS ONLINE ENCYCLOPEDIA ( which explains the mysteria and which offers solutions:

Why insufficient memory ?
Description


You can have installed lots of RAM (128 MB and more) on your machine but nethertheless ACCESS crashed after a short period of time indicating that you do not have enough memory to display something. This problem is very frequent during the development phase as you often have to change into design view of forms, reports and modules.
In general you need to reboot your computer to be able to continue. Upgrading your RAM to 256 MB (and more) does not help.
If you check the "Free ressources" window (Windows System or ACCESS Information window) you see between 5 % and 50 % .
Sometimes you will see a system alert with "Memory Running Low" before the crash.
This crash happens on different computers at different times: On Computer 1 ACCESS will crash as soon as the ressources drop under 50%, whereas Computer B will work with less than 10%.

Explanation Part 1


The RAM is divided in different areas that hold different system information. In the so-called GDI-HEAP information about the open windows are stored (Position, Status, Size, Handle...) The size of the GDI-HEAP is limited to 64kB - independantly from the total RAM installed on your machine. Once the GDI-HEAP is saturated the system (or certain programs) will crash.

Explanation Part 2

As soon as you close a window, the occupied area in the GDI-HEAP should be released. Unfortunately, this does not work properly with ACCESS neither on closing a single database object (Form, Report, Module...) nor on closing ACCESS.
Explanation Part 3


As soon as you ope any VBA module (globales or Form/Report class module) all modules of the application are opened, each in a single window. In any medium sized application it can easily happen that 100 windows are opened instantly. This moment leads quite often to a crash because the GDI HEAP is saturated.
Solutions

There are several workarounds, you should opt for a combination:
Limit the number of forms, reports and modules.
Delete all unused database objects
Limit the number of background graphics and tab controls
Distribute your database objects on different libraries
Recreate your database file regularly and import the objects
Activate the VB password and only one module window will be opened at a time
(ATTENTION: removing the VB password again might become difficult).
Do not close forms that you permanently need but make them invisible. See Article F46 for details.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top