This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 161720 - [67cat][other] RoR debugging with Glassfish V3 generates Out Of Memory execeptions.
Summary: [67cat][other] RoR debugging with Glassfish V3 generates Out Of Memory execep...
Status: RESOLVED WORKSFORME
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: esmithbss
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 03:45 UTC by esmithbss
Modified: 2009-05-20 08:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE Log File for run. (68.73 KB, text/plain)
2009-04-02 03:49 UTC, esmithbss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-04-02 03:45:55 UTC
When launching my Ruby on Rails project using a pre-existing JRuby 1.2.0 install and Glassfish V3 prelude, the
application fails to start and generates multiple Out Of Memory exceptions prior to accessing the application code. 
This was not the case in 200903310200 or before.



Apr 1, 2009 9:29:18 PM com.sun.grizzly.pool.DynamicPool logDynamicStatus
INFO: Pool started without dynamic resizing enabled. Pool will not attempt to determine the upper and lower bounds that
it should be using, and will stay at 1
Apr 1, 2009 9:29:19 PM com.sun.grizzly.jruby.RailsAdapter <init>
INFO: Jruby version is: 1.2.0
Apr 1, 2009 9:29:19 PM com.sun.grizzly.jruby.RailsAdapter startRubyRuntimePool
INFO: Starting Rails instances
Fast Debugger (ruby-debug-ide 0.4.5) listens on localhost:57613
/home/esmith/Apps/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84
warning: given block not used
Apr 1, 2009 9:29:45 PM com.sun.grizzly.pool.DynamicPool$1 run
INFO: New instance created in 25,802 milliseconds
Apr 1, 2009 9:29:46 PM com.sun.grizzly.http.SelectorThread displayConfiguration
INFO: 
 Grizzly configuration for port 3000
         maxThreads: 5
         minThreads: 5
         ByteBuffer size: 8192
         maxHttpHeaderSize: 8192
         maxKeepAliveRequests: 256
         keepAliveTimeoutInSeconds: -1
         Static File Cache enabled: true
         Static resources directory: /home/esmith/Development/ResNet-V3.21/public
         Adapter : com.sun.grizzly.jruby.RailsAdapter
         Thread Pool (Pipeline): com.sun.grizzly.http.LinkedListPipeline
         Asynchronous Request Processing enabled: true
Exception in thread "httpWorkerThread-3000-0" java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
        at com.sun.grizzly.util.ByteBufferFactory.allocateView(ByteBufferFactory.java:105)
        at com.sun.grizzly.util.ByteBufferFactory.allocate(ByteBufferFactory.java:137)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:171)
Exception in thread "httpWorkerThread-3000-2" java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
        at com.sun.grizzly.util.ByteBufferFactory.allocateView(ByteBufferFactory.java:105)
        at com.sun.grizzly.util.ByteBufferFactory.allocate(ByteBufferFactory.java:137)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:171)
Exception in thread "httpWorkerThread-3000-4" java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
        at com.sun.grizzly.util.ByteBufferFactory.allocateView(ByteBufferFactory.java:105)
        at com.sun.grizzly.util.ByteBufferFactory.allocate(ByteBufferFactory.java:137)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:171)
Exception in thread "httpWorkerThread-3000-3" java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
        at com.sun.grizzly.util.ByteBufferFactory.allocateView(ByteBufferFactory.java:105)
        at com.sun.grizzly.util.ByteBufferFactory.allocate(ByteBufferFactory.java:137)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:171)
Exception in thread "httpWorkerThread-3000-1" java.lang.OutOfMemoryError: Java heap space


Looking at the IDE log file, it appears that the Platform manager is having problems with platform identification where
a space is in the platform name and since it cannot find it, it reverts to the built-in version.
Comment 1 esmithbss 2009-04-02 03:49:03 UTC
Created attachment 79255 [details]
IDE Log File for run.
Comment 2 Erno Mononen 2009-04-02 09:13:51 UTC
Thanks for the report. So this happens to you only when debugging? Can you please try whether increasing Xmx in 
<glassfish_install>domains/domain1/config/domain.xml would help? (Assuming you're using domain1). There should be 
something like 

<jvm-options>-Xmx512m</jvm-options>

in the java-config section. Try setting it e.g. to 1024m.
Comment 3 Erno Mononen 2009-04-06 12:18:12 UTC
Have you had a chance to try whether changing the Xmx setting helps? Also, can you please attach the server log file 
from <gf install>/domains/domain1/logs/server.log? I'm mostly interested in how many and how big apps there are running 
simultaneously on the server -- we should consider increasing the default Xmx setting if this happens with just one 
standard size app.
Comment 4 Jiri Kovalsky 2009-05-05 13:27:55 UTC
Eric, any update on this? Thanks!
Comment 5 esmithbss 2009-05-06 06:36:49 UTC
I'll check this out again.  I don't think I've encountered it since, but let's make sure.
Comment 6 Jiri Kovalsky 2009-05-19 10:35:54 UTC
Any update Eric or can we close this bug? Thanks!
Comment 7 Jiri Kovalsky 2009-05-20 08:39:41 UTC
Based on an offline communication with Eric I am closing this bug. Eric has not seen similar memory problems for quite
some time.