You can run out in two circumstances.
1) You've set the -Mx value in the java command line.
2) The JVM is running in a constrained storage pool.

The OS cares nothing about running out of allocated memory as set in -Mx. You'll get a Java-specific message about that.

I don't think there's anything you can do about running out of memory in a constrained storage pool. As David points out, the memory is just going to page out until the garbage collector starts to barf when it tries to clear memory that has to be paged in. It barfs but never quits; just goes slowly. I suppose you could try to constrain the disk storage for the job; then you'd get some kind of a message from the OS when the job exceeded the disk limit. I think there's a setting in the job description for setting the max storage for the job.

----- Original Message ----- From: "David Gibbs" <david@xxxxxxxxxxxx>
To: "Java Programming on and around the IBM i" <java400-l@xxxxxxxxxxxx>
Sent: Monday, March 24, 2014 1:39 PM
Subject: Re: Checking a JVM for out-of-memory?


On 3/24/2014 1:27 PM, James H. H. Lampert wrote:
Is there anything OS/400-specific for detecting an out-of-memory
condition on a JVM job?

I'm not 100% sure, but I don't think you can actually run out of memory with the IBM i JVM.

I think you can use so much memory that the job starts paging memory in & out at a rate that causes performance problems.

I could be wrong.

david

--
IBM i on Power Systems: For when you can't afford to be out of business!

I'm riding a metric century (100 km / 62 miles) in the 2014 Chicagoland Tour de Cure to raise money for diabetes research, education, and advocacy. Sponsor me by visiting http://archive.ridewithdavid.com. Any amount is appreciated.

See where I get my donations from ... visit http://archive.ridewithdavid.com/mapdonations.php for an interactive map (it's a geeky thing).
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.