From: RedGrittyBrick on
On 19/02/2010 05:54, Krist wrote:
> On 19 Feb, 12:36, Krist wrote:
>> On 19 Feb, 00:54, RedGrittyBrick wrote:
>>> On 18/02/2010 17:01, Krist wrote:
>>>> On 18 Feb, 22:39, Lew wrote:
>>>>> Krist wrote:
>>>>>> From the output below, is there any sign of memory leak ?
>>>>>
>>>>> There is no sign of a memory "leak".
>>>>> There is no sign of a lack of a memory "leak".
>>>>
>>>> What can be the signs, if indeed there is the "leak" ?
>>>
>>> Firstly, I think you may mean what some people call packratting rather
>>> than the usual meaning of "memory leak".
>>> <http://mindprod.com/jgloss/packratting.html>
>>
>>> Secondly, because you started this discussion, I imagine you already
>>> have some sign that you consider indicative of a "memory leak". What
>>> sign was that?
>>
>>
>> The sign is : intermittently, the JVM got not responding and the apps
>> server restart it. That is the sign that make me think that what cause
>> the JVM restart :
>>
>> Memory leak ?
>> Full GC ?
>> Setting the Heap not correct : -ms3072M -mx3072M -XX:
>> +UseConcMarkSweepGC -XX:+UseParNewGC -
>> XX:MaxPermSize=1024M ???
>>
>> What may cause the JVM to no responding ?
>>
>
> I Forget to include the error in log file when the JVM restart : there
> is 'Too many open files' error.
>
> 10/02/08 05:34:40 oracle.ias.opmn.optic.OpticBadConnectException:
> Error connecting to OPMN (is it running?): Too many open files


Your problem /appears/ to be that your application or IAS is holding
open too many files. This may be merely a symptom of the underlying
cause. To me it doesn't immediately look like a memory leak in the JVM.

OPM is the Oracle Process Manager - I don't know anything about this.
According to the Oracle website it is part of their IAS application
server which "Provides automatic restart of Oracle Application Server
processes when they become unresponsive"


> 10/02/08 05:34:51 oracle.ias.opmn.optic.OpticBadConnectException:
> Error reading formFactorFile: /opt/oracle/product/10.1.3.1/OracleAS_1/
> opmn/conf/.formfactor (/opt/oracle/product/10.1.3.1/OracleAS_1/opmn/
> conf/.formfactor (Too many open files))

Here's where attempting to read an OPMN file is failing due to lack of
resources. That file is used by processes that need to talk to OPMN.
Maybe there's too many of them?

Another thing OPMN does is "Enables gathering of host and Oracle
Application Server process statistics and tasks." Maybe gathering those
statistics over a period of time and examining them will provide some
ideas about the underlying causes of the problem?

There's too much uninformed guesswork above. What do Oracle support say?

--
RGB
From: Martin Gregorie on
On Fri, 19 Feb 2010 11:23:36 +0000, RedGrittyBrick wrote:

>> I Forget to include the error in log file when the JVM restart : there
>> is 'Too many open files' error.
>>
>> 10/02/08 05:34:40 oracle.ias.opmn.optic.OpticBadConnectException: Error
>> connecting to OPMN (is it running?): Too many open files
>
>
> Your problem /appears/ to be that your application or IAS is holding
> open too many files. This may be merely a symptom of the underlying
> cause. To me it doesn't immediately look like a memory leak in the JVM.
>
You don't say what OS you're using, but if its one of the unices, have
you used sar to see what's happening in the computer?

If you run sar with the -v reporting option you can track how many file
handles and inodes are open. If the number gradually rises until the 'too
many files' error occurs, there's probably a programming error -
something is opening files but never closing them.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
From: Krist on
On 19 Feb, 18:40, Martin Gregorie <mar...(a)address-in-sig.invalid>
wrote:
> On Fri, 19 Feb 2010 11:23:36 +0000, RedGrittyBrick wrote:
> >> I Forget to include the error in log file when the JVM restart : there
> >> is 'Too many open files' error.
>
> >> 10/02/08 05:34:40 oracle.ias.opmn.optic.OpticBadConnectException: Error
> >> connecting to OPMN (is it running?): Too many open files
>
> > Your problem /appears/ to be that your application or IAS is holding
> > open too many files. This may be merely a symptom of the underlying
> > cause. To me it doesn't immediately look like a memory leak in the JVM.
>
> You don't say what OS you're using, but if its one of the unices, have
> you used sar to see what's happening in the computer?
>
> If you run sar with the -v reporting option you can track how many file
> handles and inodes are open. If the number gradually rises until the 'too
> many files' error occurs, there's probably a programming error -
> something is opening files but never closing them.
>
> --
> martin@   | Martin Gregorie
> gregorie. | Essex, UK
> org       |

Hi Sir,
We run Linux Redhat 4 Update 2, JDK 1.5 U15. Attached below is the
output of sar -v. (but today the error not occur)

As additional information, this 'too many files' error seems to occur
just after I put 2 JVMs being load balanced (by the apps server) to
run the applications.
With 1 JVM this error never occur. (ulimit already 65536)
Could this be because 2 JVM ?

Thank you,
Krist

Linux 2.6.9-22.ELsmp 02/20/2010

12:00:01 AM dentunusd file-sz inode-sz super-sz %super-sz dquot-
sz %dquot-sz rtsig-sz %rtsig-sz
12:10:01 AM 143044 0 70170 0 0.00
0 0.00 0 0.00
12:20:01 AM 143046 0 70172 0 0.00
0 0.00 0 0.00
12:30:01 AM 138002 0 70138 0 0.00
0 0.00 0 0.00
12:40:01 AM 129253 0 69095 0 0.00
0 0.00 0 0.00
12:50:01 AM 129595 0 69097 0 0.00
0 0.00 0 0.00
01:00:01 AM 125588 0 68008 0 0.00
0 0.00 0 0.00
01:10:01 AM 124714 0 67789 0 0.00
0 0.00 0 0.00
01:20:01 AM 124719 0 67786 0 0.00
0 0.00 0 0.00
01:30:01 AM 124721 0 67786 0 0.00
0 0.00 0 0.00
01:40:01 AM 124769 0 67800 0 0.00
0 0.00 0 0.00
01:50:01 AM 124791 0 67804 0 0.00
0 0.00 0 0.00
02:00:01 AM 124793 0 67804 0 0.00
0 0.00 0 0.00
02:10:01 AM 124795 0 67805 0 0.00
0 0.00 0 0.00
02:20:01 AM 124818 0 67812 0 0.00
0 0.00 0 0.00
02:30:01 AM 124820 0 67812 0 0.00
0 0.00 0 0.00
02:40:01 AM 124822 0 67813 0 0.00
0 0.00 0 0.00
02:50:01 AM 124930 0 67878 0 0.00
0 0.00 0 0.00
03:00:01 AM 125071 0 67975 0 0.00
0 0.00 0 0.00
03:10:01 AM 125310 0 68119 0 0.00
0 0.00 0 0.00
03:20:01 AM 125789 0 68200 0 0.00
0 0.00 0 0.00
03:30:01 AM 126268 0 68327 0 0.00
0 0.00 0 0.00
03:40:01 AM 126647 0 68504 0 0.00
0 0.00 0 0.00
03:50:01 AM 126957 0 68635 0 0.00
0 0.00 0 0.00
04:00:01 AM 127647 0 68602 0 0.00
0 0.00 0 0.00
04:10:01 AM 177578 0 124786 0 0.00
0 0.00 0 0.00
04:20:01 AM 178907 0 124949 0 0.00
0 0.00 0 0.00
04:30:01 AM 180024 0 124922 0 0.00
0 0.00 0 0.00
04:40:01 AM 180807 0 125115 0 0.00
0 0.00 0 0.00
04:50:01 AM 181799 0 125285 0 0.00
0 0.00 0 0.00
05:00:01 AM 177477 0 120292 0 0.00
0 0.00 0 0.00
05:10:01 AM 178299 0 120180 0 0.00
0 0.00 0 0.00
05:20:02 AM 179401 0 120327 0 0.00
0 0.00 0 0.00
05:30:01 AM 180223 0 120261 0 0.00
0 0.00 0 0.00
05:40:01 AM 181359 0 120491 0 0.00
0 0.00 0 0.00
05:50:01 AM 181039 0 119211 0 0.00
0 0.00 0 0.00
06:00:01 AM 175933 0 112964 0 0.00
0 0.00 0 0.00
06:10:01 AM 177016 0 113186 0 0.00
0 0.00 0 0.00
06:20:01 AM 177383 0 112286 0 0.00
0 0.00 0 0.00
06:30:01 AM 178368 0 112111 0 0.00
0 0.00 0 0.00
06:40:01 AM 179406 0 112144 0 0.00
0 0.00 0 0.00
06:50:01 AM 180165 0 112326 0 0.00
0 0.00 0 0.00
07:00:01 AM 181079 0 112281 0 0.00
0 0.00 0 0.00
07:10:01 AM 182515 0 112228 0 0.00
0 0.00 0 0.00
07:20:01 AM 183327 0 112542 0 0.00
0 0.00 0 0.00
07:30:01 AM 183960 0 111947 0 0.00
0 0.00 0 0.00
07:40:01 AM 184804 0 112078 0 0.00
0 0.00 0 0.00
07:50:01 AM 185540 0 112291 0 0.00
0 0.00 0 0.00
08:00:01 AM 179356 0 105616 0 0.00
0 0.00 0 0.00
08:10:01 AM 166140 0 91830 0 0.00
0 0.00 0 0.00
08:20:01 AM 166129 0 91417 0 0.00
0 0.00 0 0.00
08:30:01 AM 165331 0 91088 0 0.00
0 0.00 0 0.00
08:40:01 AM 165561 0 91070 0 0.00
0 0.00 0 0.00
08:50:01 AM 165840 0 90992 0 0.00
0 0.00 0 0.00
09:00:01 AM 164196 0 89872 0 0.00
0 0.00 0 0.00
09:10:01 AM 164663 0 89682 0 0.00
0 0.00 0 0.00
09:20:01 AM 165727 0 89889 0 0.00
0 0.00 0 0.00
Average: 155612 0 92261 0 0.00
0 0.00 0 0.00