Solved

Out of Memory Error

Posted on 2009-05-19
25
449 Views
Last Modified: 2012-05-07
While I am running a certain application, it hangs and an out of memory error begin appearing. I tried a lot then i figured that the used memory is just about 500 MB when the out of memory error appeared. My cash is 2 GB and I have 4 GB RAM
anybody has a solution for that?
0
Comment
Question by:first_MCITP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 6
  • 4
  • +2
25 Comments
 
LVL 30

Expert Comment

by:flubbster
ID: 24420613
The obvious way to start is to remove all Ram, blow the dust out of the connectors, then begin to replace the memory one stick at a time. Use each stick one at a time in each socket to test. Takes some time, but it is the best way to go.

You can also download and run memtest86. Let this run through completely several times to thoroughly test the Ram.

http://www.memtest.org/
0
 
LVL 27

Expert Comment

by:Jonvee
ID: 24421123
Quite likely it is a RAM(s) problem as already described, but you may like to have a look at the 'Resolution' in this MS article >>

"Out of Memory" error message appears when you have a large number of programs running:
http://support.microsoft.com/kb/126962

0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24421150
I already did that. The problem is not a deffective RAM. I noticed that whenver a process loads to the memory about 3000 KB it will hang and raise the out of memory error, while since I have enough memory i can run another process safely??
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 35

Expert Comment

by:torimar
ID: 24421344
Windows memory is not one big block, it is compartmented into smaller "heaps" that hold specific kinds of resources. Some of these heaps by default are very small (at least in 32bit XP), and when they are full, you get an out-of-memory error, no matter how much free RAM is left.
If it is only this one application, then it may be either leaking or very resource intensive.

Also, some runtime environments create their own heap, like the Java VM does for all java programmes running within it. That heap, by default, is still only 1 Mb and may extend to 16 mb. If this is a Java application and you need more memory for it, you have to start Java with specific parameters, as explained here:
http://viralpatel.net/blogs/2009/01/jvm-java-increase-heap-size-setting-heap-size-jvm-heap.html

Here is guide for increasing the desktop heap:
http://www.techarp.com/showarticle.aspx?artno=238
0
 
LVL 35

Expert Comment

by:torimar
ID: 24421351
ps:
What does your event log say about the error?
0
 
LVL 30

Expert Comment

by:flubbster
ID: 24421440
What is the memory configuration?

Slots used?
Size of each stick?
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24422001
thank you torimar;
I am using a vb 6.0 application.
I tried the link you gave but it still the same
in event viewr it shows Application Pop up information of event id: 26
description:
"pplication Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application. "
0
 
LVL 22

Expert Comment

by:cj_1969
ID: 24422570
check out this page and see if this helps ... http://www.vbforums.com/archive/index.php/t-299967.html
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24428922
I tried all the previous but still the same
any clue?
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24428934
I am using 8 GB RAM, 2+2+4
0
 
LVL 27

Expert Comment

by:Jonvee
ID: 24428952
Have you tried removing all RAM except the 4 GB on it's own, or initially one of the 2's on it's own?  If it works without the error, we can go from there ...
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24429043
Yes I tried removing the RAM. Also Itried the same application on different servers and it showed the same error
0
 
LVL 27

Expert Comment

by:Jonvee
ID: 24429072
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24429168
I am aware of the 32 bit and 64 bit Os, that's why i tested the application on win server 2003 64 bit of 10 GB but still the same.
I created an application that loads the emory and whenver it loads about 2.8 GB to memory it hangs, but i still can run another instant of that application but at this time will not load that amount. and running another instant will sure load less amount and so on
It's something confusing cause i tried a lot of solutions but still i can't find the appropriate solution. I think it's something preventing a process from loading memory with data larger than 3 Gb or something like that.
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24429222
the issue of the 4 GB, is appearing whenver i try to load more than 4 GB to memory which is not addressable by 32 bit OS. But still when i try to load more than 3 GB using one process this process will hang.
I think think is the major issue and i am focusing on a solution if i can allow a certain process to access more than 3GB of memory
0
 
LVL 27

Expert Comment

by:Jonvee
ID: 24429617
So maybe worthwhile looking at the reasoning behind the  /3GB switch used in the BOOT.INI file, from the Q__22510635.html thread above.
0
 
LVL 35

Expert Comment

by:torimar
ID: 24430487
first_MCITP,

don't you think you should have told us right from the start what you were doing?
Please refer to your original question: there is no mention of your application being designed for testing memory, and there is also no mentioning of a ~3GB memory limit: you were originally talking about 500 mb.

If you have the "/3GB" switch working on your server (like Jonvee pointed out as a possibility), then this will mean that user mode processes are allowed a maximum of 3GB address space. Windows only gets 1 GB of address space, and is impeded in its multi-tasking functionality.
This would explain perfectly what you are experiencing.
And I guess you would have received this explanation in the first comment, had you told us all we need to know.

For example:
I checked through all the known event ID 26 errors; there is only one that deals with memory. But it refers to running out of virtual memory - which did not seem to fit the scenario as you originally described it. So I refrained from following that clue any further. But now, knowing that you actually try to load up on data in memory until you hit a limit, this will fit again.
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24430563
OOPs I was mistaken it is allocating 2 GB for one process.
Dear Jonvee;
the /3G switch is to allow window use 1 GB and user use 3 GB but I am talking here about a process which will not use more than 2 Gb although i can run another process to consume more memory until i reach the 3+1 GB.
Hope you got my point
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24430596
Dear Torimar;
The things related to memory loader application and the other is coming after. First I was facing this error then i was trying to figure why and whenever I conclude to a posting it. and due to the /3G yes its configured but as I replied to Jonvee, if the 3 Gb is totally consumed i will not be able to run any other instance.
For your info also i tried my memory loader application to a 64 bit server and the result still the same.
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24438616
Dear Guys;
I found the cause of the problem.
I was logging remotely using terminal server that's why windows why trying allocate few resources to me, I changed the desktop heap and its working fine now.
Thank you
0
 
LVL 35

Expert Comment

by:torimar
ID: 24445860
Dear first_MCITP,
sorry for interfering with the proposed closing procedure, but I have to comment on it.

In your proposed solution (ID:24438616) you say:
"... windows why trying allocate few resources to me, I changed the desktop heap and its working fine now."

If you review my first comment ID:24421344, then you will see that:
1. - I was the one to introduce the concept of "heaps" into this thread;
2. - I suggested that a wrong heap setting could very well explain the problem you encountered;
3. - I suggested that the application you were having a problem with was perhaps "very resource intensive" - which would account for a heap overflow;
4. - I finally gave you the link to a site that a) describes the 'desktop heap', and b) explains how to change it.

So it appears like all clues to the final solution of the problem are already there in my comment. To me, this seems to be worth more than an assist with only a fifth of the point pool.

I file this objection in order to have a moderator review the thread and verify whether my judgment is correct or not.
0
 
LVL 35

Accepted Solution

by:
torimar earned 500 total points
ID: 24460241
In my objection (ID:24445860) I already listed 4 reasons why I think that my comment ID:24421344 contains all necessary info for being a solution to this thread.

The asker, however, does not see it like this, and also does not care to explain why.
In his closing proposal he wanted his own comment (in which he basically states that he did what I suggested) to be the solution, my comment to be an assist with 100 points.

Although I do not understand the reasoning behind this, I am going to respect the asker's basic trend of splitting points between him and me in my recommendation.

So here is what I recommend:
- Accepted Solution (300 points): http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_24420293.html?cid=238#a24421344 - (torimar)

- Assisted Solution (200 points): http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_24420293.html?cid=238#a24438616 - (first_MCITP)
0
 
LVL 1

Author Comment

by:first_MCITP
ID: 24460685
Dear Torimar;
Yes you are right, you was very helpful in finding the solution.
Dear support;
What is needed to be done now?
0
 
LVL 35

Expert Comment

by:torimar
ID: 24461797
Thank you very much, first_MCITP, for returning to this thread and clearing the issue.

Since you accepted a solution, the question way correctly closed, and nothing else needs to be done.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn about cloud computing and its benefits for small business owners.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question