Out of Memory Error

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?
LVL 1
first_MCITPAsked:
Who is Participating?
 
torimarCommented:
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
 
flubbsterCommented:
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
 
JonveeCommented:
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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
first_MCITPAuthor Commented:
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
 
torimarCommented:
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
 
torimarCommented:
ps:
What does your event log say about the error?
0
 
flubbsterCommented:
What is the memory configuration?

Slots used?
Size of each stick?
0
 
first_MCITPAuthor Commented:
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
 
cj_1969Commented:
check out this page and see if this helps ... http://www.vbforums.com/archive/index.php/t-299967.html
0
 
first_MCITPAuthor Commented:
I tried all the previous but still the same
any clue?
0
 
first_MCITPAuthor Commented:
I am using 8 GB RAM, 2+2+4
0
 
JonveeCommented:
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
 
first_MCITPAuthor Commented:
Yes I tried removing the RAM. Also Itried the same application on different servers and it showed the same error
0
 
JonveeCommented:
0
 
first_MCITPAuthor Commented:
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
 
first_MCITPAuthor Commented:
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
 
JonveeCommented:
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
 
torimarCommented:
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
 
first_MCITPAuthor Commented:
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
 
first_MCITPAuthor Commented:
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
 
first_MCITPAuthor Commented:
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
 
torimarCommented:
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
 
first_MCITPAuthor Commented:
Dear Torimar;
Yes you are right, you was very helpful in finding the solution.
Dear support;
What is needed to be done now?
0
 
torimarCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.