OutOfMemoryError: Java heap space, with lots of heap space left
Hello. I've been seeing my web app (running on Linux) start to throw OutOfMemoryError(s) after a few days of running time. The following is the output of jstat -gc every 10 seconds. From the last 8 lines or so, it seems that the eden space is full, but both survivor spaces and the old gen space have plenty of room - it's like garbage collection has stopped, and no memory is getting freed in eden - hence the OutOfMemory errors.
Am I misinterpreting the log output? What could be going on?
thanks.
Timestamp S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
593233.4 232960.0 232960.0 0.0 69388.3 233088.0 231023.7 1398144.0 342477.6 49728.0 49379.2 42476 3326.366 9972 7617.863 10944.229
593243.4 232960.0 232960.0 1968.6 0.0 233088.0 212192.0 1398144.0 343210.3 49728.0 49383.0 42477 3326.375 9972 7617.863 10944.238
593253.4 232960.0 232960.0 0.0 0.0 233088.0 170145.7 1398144.0 356161.9 49728.0 49408.7 42478 3326.400 9973 7618.741 10945.141
593263.5 232960.0 232960.0 15776.2 0.0 233088.0 110039.1 1398144.0 356161.9 49728.0 49414.7 42479 3326.427 9973 7618.741 10945.168
593273.4 232960.0 232960.0 0.0 15136.0 233088.0 50067.5 1398144.0 358475.4 49728.0 49416.4 42480 3326.455 9973 7618.741 10945.196
593283.4 232960.0 232960.0 15392.0 0.0 233088.0 36674.5 1398144.0 360344.5 49728.0 49416.4 42481 3326.482 9973 7618.741 10945.223
593293.5 232960.0 232960.0 15392.0 0.0 233088.0 141464.3 1398144.0 360344.5 49728.0 49416.4 42481 3326.482 9973 7618.741 10945.223
593303.5 232960.0 232960.0 0.0 21440.0 233088.0 84732.7 1398144.0 361733.4 49728.0 49416.4 42482 3326.515 9973 7618.741 10945.256
593313.5 217472.0 225216.0 0.0 0.0 233088.0 175326.7 1398144.0 366982.4 49792.0 49429.0 42483 3326.527 9974 7619.606 10946.134
593323.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593333.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593343.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593353.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593363.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593373.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
593383.5 217472.0 225216.0 0.0 0.0 233088.0 233080.9 1398144.0 366982.4 49792.0 49429.3 42483 3326.527 9974 7619.606 10946.134
Which java-version are you using - and if its an old one does the problem also happen with the latest jdk5 or 6 update releases.
There have been some bugs which stop the collector for some time but allow allocation, which have been fixed now.
lg Clemens
Similar Messages
-
Replacing Home Space with a specific Group Space.
Hi,
We have a Webcenter Spaces 11.8 environment.
We are trying to completely bypass the home space and take the user to a specific space.
While this is possible to do it through the initial redirection based on application/enterprise role, some re-directions are causing the user to land in the home space.
Also, the user can get to the home space pages by typing in the url. We want to restrict the user from viewing the home space altogether and replace it completely with our group space.
Approach1 : Page Links -
We tried to bring in pages from the group space into the home space navigation model as page links. Even if the group space is public, we cannot link to its pages as we cannot see the pages in the page link popup. Only home space pages are shown. Is this expected? How do we bring in pages from a specific group space into the home page navigation?
Approach 2: Group Space Pages Query -
We can bring all the pages from the "Default Navigation Model" of the group space into the home space navigation model. However, the landing page upon login needs to be a visible page in the home space. How do we get the user redirected to a specific page in a group space and make that node as selected once the user logs in.
Thanks in advance.Hi,
Check this code.
data : role(10) type c value 'crick ter',
role1(10) type c,
role2(10) type c.
write: / role.
SPLIT role AT space INTO role1 role2.
concatenate role1 role2 into role separated by '_'.
write: / role.
<REMOVED BY MODERATOR>
Regards.
Edited by: Alvaro Tejada Galindo on Mar 10, 2008 7:25 PM -
The websites are very basic, with lots of white space.
Can you attach a screenshot?
*http://en.wikipedia.org/wiki/Screenshot
*https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
Use a compressed image type like PNG or JPG to save the screenshot.
Make sure that you haven't enabled a High Contrast theme in the Accessibility settings and that you allow pages to choose their colors in Firefox.
*Apple menu, choose System Preferences -> Click Universal Access -> Seeing
*Firefox > Preferences > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
*http://kb.mozillazine.org/Website_colors_are_wrong -
Trouble with "java.lang.OutOfMemoryError: Java heap space"
Hello,
I use a Java-based modeling tool that very few out there are probably familiar with. This tool allows me to run models (program) from within the development environment, to create Applets or create jar files that can be executed in a stand-alone fashion.
I am using a database on my local harddrive to read in some data using JDBC, so am not using the Applet option with certificates. The development environment is expensive, so can't be distributed. That leaves the stand-alone option.
The model (program) I've written runs perfectly fine in the development environment and, previously, has worked fine as a stand-alone program. However, the stand-alone option isn't working anymore, because I keep getting this error.
I am not much of a Java programmer; I'm learning as I go along. If anyone can help me solve this, I'll be most appreciative
From my cmd prompt:
C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>cd "C:\D
ocuments and Settings\072\Desktop\TA\for\for Applet Files"
C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>java -cl
asspath enterprise_library.jar;business_graphics_library.jar;for.jar;xjanylog
ic5engine.jar for/Main$Simulation
Started...
AnyLogic simulation engine has started [$Id: Engine.java,v 1.134 2004/12/03 08:4
9:39 basil Exp $]
java.lang.OutOfMemoryError: Java heap space
setting error: Exception during root.courseQueue-1556 startup: java.lang.OutOfMe
moryError: Java heap space
thread = Thread[Model Creation Thread,5,main]
engine = com.xj.anylogic.Engine@1099257
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac
e
java.lang.OutOfMemoryError: Java heap space
setting error: Exception during startup: java.lang.OutOfMemoryError: Java heap s
pace
thread = Thread[Model Creation Thread,5,main]
engine = com.xj.anylogic.Engine@1099257
java.lang.OutOfMemoryError: Java heap space
setting error: Exception in statechart 'root.courseExit-0.inputProcessor' entry
actions: java.lang.OutOfMemoryError: Java heap space
thread = Thread[AnyLogic main thread,5,main]
engine = com.xj.anylogic.Engine@1099257
java.lang.OutOfMemoryError: Java heap space
setting error: Exception in statechart 'root.courseDelay-0.inputProcessor' entry
actions: java.lang.OutOfMemoryError: Java heap space
thread = Thread[AnyLogic main thread,5,main]
engine = com.xj.anylogic.Engine@1099257
java.lang.OutOfMemoryError: Java heap space
setting error: Exception in statechart 'root.courseDelay-1.inputProcessor' entry
actions: java.lang.OutOfMemoryError: Java heap space
thread = Thread[AnyLogic main thread,5,main]Exception in thread "AWT-EventQueu
e-0"
java.lang.OutOfMemoryError: Java heap space
engine = com.xj.anylogic.Engine@1099257Hi I am ancountering the same problem with the 'heap space'.
Is there any way I can find out what it is set to for my system? I dont believe its 32Mb and dont want to increase it randomly to too large a size if theres no need for it.
Thanks,
Bobby -
J2EE engine restart with java.lang.OutOfMemoryError Java heap space
Hi
I hope someone can help me, I have an error on my J2EE engine.
My portal restarts only when I click on User - Administration - Identity Management.
Here is the log error.
Exception id: [000000000000005B0000001C0000098800045ACD637E87AB]#
#1.5^H#0000000000000059000000690000098800045ACD6EF06673#1225738282886#com.sap.engine.frame.Environment##com.sap.engine.frame.
Environment#J2EE_GUEST#0##host_SID_4130050#J2EE_ADMIN#40cf7230a9d811dda9f9000000000000#SAPEngine_Application_Thread[impl:3
]_13##0#0#Error#1#/System/Server/Critical#Plain###FATAL: Caught OutOfMemoryError! Node will exit with exit code 666#
#1.5^H#00000000000000590000006A0000098800045ACD6EF06833#1225738282886#com.sap.engine.frame.Environment##com.sap.engine.frame.
Environment#J2EE_GUEST#0##host_SID_4130050#J2EE_ADMIN#40cf7230a9d811dda9f9000000000000#SAPEngine_Application_Thread[impl:3
]_13##0#0#Fatal#1#/System#Java###FATAL: Caught OutOfMemoryError! Node will exit with exit code 666
[EXCEPTION]
#1#java.lang.OutOfMemoryError: Java heap space
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at com.sap.engine.services.deploy.server.ApplicationLoader.defineClassWithInterception(ApplicationLoader.java:168)
at com.sap.engine.services.deploy.server.ApplicationLoader.loadLocalClass(ApplicationLoader.java:140)
at com.sap.engine.frame.core.load.ResourceLoader.loadClass(ResourceLoader.java:127)
at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:365)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at com.sap.security.core.wd.assignusermapping.wdp.InternalAssignUserMappingComp.<init>(InternalAssignUserMappingComp.
java:173)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:51)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:382)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:940)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:177)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:149)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createInstanceIfDemanded(ComponentUsage.java:728)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getImplementingInterfaceViewInfo(ComponentUsage.java:403)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.getViewManagerFor(ClientComponent.java:305)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:628)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:694)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
Thanks for your helppretty obvious to me "java.lang.OutOfMemoryError: Java heap space"
Read,
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/jsts/(Kernel)OOM
or
java.lang.OutOfMemoryError: Java heap space
those links should give you a fairly good idea on how to solve the issue.
Regards
Juan -
Dbca errors out with java.lang.OutOfMemoryError: Java heap space
hi gurus
I am trying to use DBCA to create a 10.2.0.4 database on a HP platform.DBCA hangs at the step 6 and following message can be seen in the
trace.log:
java.lang.OutOfMemoryError: Java heap space
I googled and modified the DBCA scripts content from
# Run DBCA
$JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx128m
-classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
to
# Run DBCA
$JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx256m
-classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
and rerun the DBCA and the problem still there.
How to solve this problem?
Thanks !
Edited by: KevinMao on Mar 31, 2010 2:39 AM
Edited by: KevinMao on Mar 31, 2010 2:42 AMhi gurus
The problem has sovled.I supplyed the wrong file for the rawfile.conf,everything was fine after I provided the corrent one.
Thanks for your time. -
How to solve : java.lang.OutOfMemoryError: Java heap space
Dear all,
Am using Jdeveloper 11.1.1.3 with weblogic10...
I keep getting out of memory error while working on the application , here is the exact error message that i copied from the server log :
####<28/11/2010 GMT 09:17:58 ص> <Critical> <Health> <javaserver> <AdminServer> <weblogic.GCMonitor> <<anonymous>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000012> <1290935878582> <BEA-310003> <Free memory in the server is 4,541,416 bytes. There is danger of OutOfMemoryError>
####<28/11/2010 GMT 09:24:51 ص> <Error> <Kernel> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029> <1290936291218> <BEA-000802> <ExecuteRequest failed
java.lang.OutOfMemoryError: Java heap space.
java.lang.OutOfMemoryError: Java heap space
>
####<28/11/2010 GMT 09:25:04 ص> <Notice> <Diagnostics> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936304406> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'AdminServer' has triggered at 28/11/2010 GMT 09:24:56 ص. Notification details:
WatchRuleType: Log
WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
WatchData: DATE = 28/11/2010 GMT 09:24:51 ص SERVER = AdminServer MESSAGE = ExecuteRequest failed
java.lang.OutOfMemoryError: Java heap space.
java.lang.OutOfMemoryError: Java heap space
SUBSYSTEM = Kernel USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000802 MACHINE = javaserver TXID = CONTEXTID = 3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029 TIMESTAMP = 1290936291218
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>
####<28/11/2010 GMT 09:25:36 ص> <Warning> <oracle.dfw.framework> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936336549> <DFW-40121> <failure creating incident from WLDF notification
java.lang.OutOfMemoryError: Java heap space
>
####<28/11/2010 GMT 09:26:32 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936392224> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
####<28/11/2010 GMT 09:26:35 ص> <Alert> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
####<28/11/2010 GMT 09:26:35 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000365> <Server state changed to FORCE_SUSPENDING>
####<28/11/2010 GMT 09:26:53 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936413632> <BEA-000365> <Server state changed to ADMIN>
####<28/11/2010 GMT 09:26:56 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936416757> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
####<28/11/2010 GMT 09:26:59 ص> <Notice> <Server> <javaserver> <AdminServer> <DynamicListenThread[Default[1]]> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000035> <1290936419289> <BEA-002607> <Channel "Default[1]" listening on 127.0.0.1:7001 was shutdown.>
####<28/11/2010 GMT 09:27:07 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-41> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936427508> <BEA-000378> <Server failed to shutdown within the configured timeout of 30 seconds. The server process will exit now.>
i searched the net and it seems that i should increase the java heap size , how can i do that... I have a server with 4G Ram ..
Regards,
Lama
Edited by: Delta on Nov 28, 2010 1:36 AMMy frien google tells me that you use
>
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
This can have two reasons:
* Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
* Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:
java -Xms<initial heap size> -Xmx<maximum heap size>
>
Timo -
Dear All,
I am trying to use JDeveloper 10.1.3.0.4 (SU2) on Windows XP SP2. My machine is almost new and has 2.5 GB of RAM and 2 processors with 3.0 GHz each. Should be enough, right?
When I try to startup JDeveloper, I am often getting an exception java.lang.OutOfMemoryError: Java heap space. At other times, I see that JDeveloper is using an awful lot of virtual memory - e.g. 590 MB. Then at least, JDeveloper opens normally, but it's not stable at all.
I guess, there's something in the workspace - created in JDeveloper 9.0.5 and now migrated - that I am trying to open that is giving trouble, because in the lower right corner I see a message "scanning sources". This message does not want to go away. JDeveloper continues to scan. When I try to edit, I get a light blue screen after some time and JDeveloper hangs. What is happening?
Kind regards,
DobedaniIncreasing the memory in this case won't help at all.
The constructor of MyFrame creates an object of type WrapCheckers3D.
The constructor of WrapCheckers3D creates an object of type MyFrame.
This leads to an infinite recusion of object creation that fills your memory heap. You need to get rid of that recursion.
Usually you'll get another exception in that case (namely a StackOverflowError), but you get a OOM-Error, probably because you create big objects during the recursion. -
Server SSLSocket + java.lang.OutOfMemoryError: Java heap space
Hi guys,
I have problem with SSLSocket on server, sometimes when client try to connect to server "java.lang.OutOfMemoryError: Java heap space" error appear. I have created SSLServerSocket then in loop socket is listenig and waiting for accept a client.
private SSLServerSocket mSocket = createServerSocket(port);mSocket is ok, problem must be somewhere in code below:
private Socket acceptSocket() throws IOException {
SSLSocket s = (SSLSocket) mSocket.accept();
s.startHandshake();
return s;
}Where can be problem ?
Thanks a lot
/zipposmSocket is ok, problem must be somewhere in code below:Why?
Where can be problem ?Somewhere else?
NB You don't need to call startHandshake(), it is automatic when the first I/O happens. And you certainly shouldn't call it in the thread that does the accept(). -
I'm trying to rebuild my iPhone app, with hires graphics etc, using CS6 Flash Pro. However, I get this now,
Exception in thread "main" java.lang.OutOfMemoryError.java heap space ..... followed by a lot of location information related to the error.
Now, how do I increase the java memory allowances if that's the problem. I've already upp the jvm.ini file from 128 to 512. No difference.
I'm based on
Win8, 8GB RAM, x64
I'm obviously asking it to load a lot of resources - but hey, Flahs should be able to handle it right?
thanks if anyone can helpHmmm. Maybe I was doing something wrong with images, and icons. I'm not sure, as it's not at all clear really.
This is the Icons screen from CS6, can't see the files above 512x512unless scrolling up - 29x29,57x57,114x114. no matter.
So - after reading and rereading the Apple specs and directions, I removed the 512x512 and the 1024x1024 images from the Icons list that get pulled in during build.
Next, I again re-read the Apple directives, and put the required files for the build into the base directory of the build, as per this image.
In actual fact - I can probably leave out the last two. iTunesArtwork.xxx But I don't know, because it is entirely unclear on that point. I can find no directive regarding this at all.
Do I upload them myself? Probably? I don't know.
HOWEVER.
The build now completes. Java, or something, was very confused about finding that file called 1024x1024.png in the build list, and would not do it.
Take it out of icons, built fine. Put it in the icons directory, and crash...
Now - with the setup I am using, it all builds fine for ipad and iphone, in all resolutions.
I don't know what the problem is with what Java is seeing, but this fixes it it seems.
Hope that helps anyone else.
cheers -
OracleAS: java.lang.OutOfMemoryError: Java heap space
Hi all,
Now I'm using Oracle AS 10.1.3.0, and after some hours, the error "java.lang.OutOfMemoryError: Java heap space" appeared.
And this is the information of OracleAS memory when it has error:
Memory MXBean
Heap Memory Usage: init = 268,435,456(262,144K) used = 112,462,248(109,826K) committed = 396,558,336(387,264K) max = 517,013,504(504,896K)
Non-Heap Memory Usage: init = 16,973,824(16,576K) used = 98,829,840(96,513K) committed = 99,319,808(96992K) max = 167,772,160(163,840K)
Memory Pool MXBeans
Code Cache
Type: Non-heap memory
Usage: init = 196608(192K) used = 27540032(26894K) committed = 27885568(27232K) max = 33554432(32768K)
Peak Usage: init = 196608(192K) used = 27556992(26911K) committed = 27885568(27232K) max = 33554432(32768K)
PS Eden Space
Type:Heap memory
Usage:init = 22478848(21952K) used = 26278816(25662K) committed = 50069504(48896K) max = 54722560(53440K)
Peak Usage: init = 22478848(21952K) used = 57802752(56448K) committed = 57802752(56448K) max = 58589184(57216K)
Collection Usage:init = 22478848(21952K) used = 0(0K) committed = 50069504(48896K) max = 54722560(53440K)
PS Survivor Space
Type: Heap memory
Usage: init = 3670016(3584K) used = 1082080(1056K) committed = 2424832(2368K) max = 2424832(2368K)
Peak Usage: init = 3670016(3584K) used = 19857256(19391K) committed = 19857408(19392K) max = 19857408(19392K)
Collection Usage: init = 3670016(3584K) used = 1082080(1056K) committed = 2424832(2368K) max = 2424832(2368K)
PS Old Gen
Type: Heap memory
Usage: init = 238616576(233024K) used = 85108712(83113K) committed = 344064000(336000K) max = 477233152(466048K)
Peak Usage: init = 238616576(233024K) used = 477233152(466048K) committed = 477233152(466048K) max = 477233152(466048K)
Collection Usage: init = 238616576(233024K) used = 85108712(83113K) committed = 344064000(336000K) max = 477233152(466048K)
PS Perm Gen
Type: Non-heap memory
Usage: init = 16777216(16384K) used = 71289808(69618K) committed = 71434240(69760K) max = 134217728(131072K)
Peak Usage: init = 16777216(16384K) used = 71289808(69618K) committed = 71696384(70016K) max = 134217728(131072K)
Collection Usage: init = 16777216(16384K) used = 71177496(69509K) committed = 71434240(69760K) max = 134217728(131072K)
And this is runtime prarameter:
-Xrs -server -XX:MaxPermSize=128m -Xms256m -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false
Any one can help me?
Rgds.Think about what happens in your program. If your program loads lots of data into memory of the AS (=heap) and you have lots of users, then you can get errors like this. The obvious solution is to start raising the heapsize, but you cannot do that anymore, since you're out of physical memory.
So with the information I have seen so far, in this case you either have to buy more memory, get less users or refactor your program. -
1) OutOfMemoryError: Java heap space 2) Could not create the JVM
Hi guys!
I'm having a lot of memory problems with the java virtual machine and I really need to fix them as soon as I can :(
I was running an heavy application on Eclipse and at the end it stopped saying:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space so I tried to enlarge the memory heap space in various ways... editing eclipse.ini (but I cannot go over a certain quantity), trying to change some parameters as:
-vmargs -XX:MaxPermSize=<memory size>or to launch a jar of my application using :
Java jar Xms1024M Xmx3000M jarnameAnd now the error I got is:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.I just don't know what to do!
I'm using a workstation but I don't have it right now in front of me... it should be a 4 core xeon-64bit having 8 giga of ram, under windows vista.
do you have any suggestions?
many many thanks!
louloucat wrote:
I don't know if it requires 3GB, I just know the default memory is not enough... I have to load an index (a Lucene-based one) made up of almost 4 GB of images... I cannot change anything of the code about it :(
Should I have to install a new java version downloading it from this page?
http://www.java.com/en/download/faq/java_win64bit.xml
I would download the 64 bit version from this page:
[http://java.sun.com/javase/downloads/widget/jdk6.jsp]
.. but you should probable be able to find it on java.com as well. -
XMLReader : java.lang.OutOfMemoryError: Java heap space
I'm using a XMLReader object to Parse XML files. About 20000 XML documents need to be parsed, so the parse(...) method is called about 20000 times in a loop.
The XML string to be parsed are all about 2500 bytes long. Java 1.5 is used.
import java.io.StringReader;
import org.xml.sax.XMLReader;
private final XMLReader parser;
private StringReader stringReader;
public void myParseMethod(final String xml) {
try {
stringReader = new StringReader(xml);
parser.parse(new InputSource(stringReader));
stringReader.close();
} catch (final SAXParseException e) {
} catch (final SAXException e) {
} catch (final IOException e) {
Calling the method myParseMethod(final String xml) goes well till about 2000 times. Then the following exception is thrown:
java.lang.OutOfMemoryError: Java heap space
at java.io.BufferedWriter.<init>(Unknown Source)
at java.io.BufferedWriter.<init>(Unknown Source)
at java.io.PrintWriter.<init>(Unknown Source)
at java.io.PrintWriter.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.util.DefaultErrorHandler.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.xs.InsulatedSchemaValidator.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaImpl.newXNIValidator(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.XercesSchema._newValidatorHandler(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.XercesSchema.newValidatorHandler(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.JAXPConfiguration.configurePipeline(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
Many thanks for help,
Frank
Edited by: 863908 on Jun 6, 2011 8:09 AM
Edited by: 863908 on Jun 6, 2011 8:11 AMBadly written code? Look into the Xerces API and you'll find out that I'm using the XML parser the normal way.Not at all. Those APIs deal with any stream. You have gone to a whole lot of extra and unnecessary trouble and expense to read the entire file, probably accumulate it into a StringBuffer, convert that to a String, and create a StringReader around it. Or else you have read the entire file into a char[] array and created a String directly from that. This strategy creates not one but two copies of the entire file in memory, and also wastes time. The normal way is to wrap an InputSource around a FileReader or InputStreamReader, probably with a BufferedReader in between. End of all that pointless and badly written code, end of the two copies of the file in memory, end of the wasting of time, and end of your memory problems too.
Full stop. -
"java.lang.OutOfMemoryError: Java heap space" while trying to read Excel.
Hi Experts,
Here is my query. I'm trying to upload excel data into database table. This excel contains more than 20000 records. I'm storing this data in a vector after reading it & passing this vector as a parameter to another method(not mentioned in the below code) which writes into the database. The code works for records <4000, but fails to read beyond that & throws exception as below.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Java heap space
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:433)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: Java heap space
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.readexcelsap_jsp._jspService(readexcelsap_jsp.java:365)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.OutOfMemoryError: Java heap space
Below is the code for reference. Kindly Help me in getting this heap space error rectified or suggest me alternate ways.
I tried increasing Heap space as googled but in vain.
<%!
private Vector readExcelSheet(String uploadedFilePath, int sheetNo) throws IOException
Vector allRowInfo = null;
try
HSSFSheet sheet= getWorkSheet(uploadedFilePath,sheetNo);
//System.out.println(uploadedFilePath);
//System.out.println(sheetNo);
//System.out.println("--Sheet--"+sheet);
//System.out.println("--Sheet--"+sheet.getLastRowNum());
if(sheet!=null)
allRowInfo = new Vector();
for(int i=0;i<=sheet.getLastRowNum();i++)
HSSFRow row= sheet.getRow(i);
Vector eachRowInfo = new Vector();
for(short j=0;j<row.getLastCellNum();j++)
eachRowInfo.add(getCellContents(row.getCell(j)));
//System.out.println("--"+row.getCell(j));
allRowInfo.add(eachRowInfo);
else
allRowInfo = null;
//return allRowInfo;
catch (FileNotFoundException ex)
System.out.println("-- Error in reading--getWorkSheet -- 1--"+ex);
allRowInfo = null;
catch (IOException ex)
System.out.println("-- Error in reading--getWorkSheet-- 2 --"+ex);
allRowInfo = null;
catch (IndexOutOfBoundsException ex)
System.out.println("-- Error in reading--getWorkSheet-- 2 --"+ex);
allRowInfo = null;
catch (NullPointerException ex)
System.out.println("-- Error in reading--getWorkSheet --"+ex);
allRowInfo = null;
catch(Exception e)
System.out.println(e.getMessage());
e.printStackTrace();
allRowInfo = null;
return allRowInfo;
%>
<%!
private HSSFSheet getWorkSheet(String uploadedFilePath, int sheetNo) throws IOException
HSSFSheet sheet = null;
try
FileInputStream inputStream=new FileInputStream(uploadedFilePath);
POIFSFileSystem poisFile=new POIFSFileSystem(inputStream);
HSSFWorkbook workBook= new HSSFWorkbook(poisFile);
sheet = workBook.getSheetAt(sheetNo);
catch (FileNotFoundException ex)
System.out.println("-- Error in reading--getWorkSheet --"+ex);
sheet = null;
catch (IOException ex)
System.out.println("-- Error in reading--getWorkSheet --"+ex);
sheet = null;
catch (IndexOutOfBoundsException ex)
System.out.println("-- Error in reading--getWorkSheet --"+ex);
sheet = null;
catch (NullPointerException ex)
System.out.println("-- Error in reading--getWorkSheet --"+ex);
sheet = null;
catch(Exception e)
System.out.println(e.getMessage());
e.printStackTrace();
sheet = null;
return sheet;
%>
<%!
public String getCellContents(HSSFCell cell)
String cellValue="";
String cellValue1="";
if(cell!=null)
int cellType= cell.getCellType();
if(cellType==HSSFCell.CELL_TYPE_NUMERIC)
cellValue=(float)cell.getNumericCellValue()+"";
if(cellType==HSSFCell.CELL_TYPE_STRING)
cellValue1=cell.getStringCellValue();
StringBuffer sb = new StringBuffer();
for(int i = 0; i < cellValue1.length(); i++)
sb.append(cellValue1.charAt(i));
if(cellValue1.charAt(i)=='\'')
sb.append('\'');
cellValue = sb.toString();
return cellValue;
%>
<html>
<body>
<%
String file_Name="Myexcel.xls";
String path = "D://Test Upload//"+file_Name;
Vector list = readExcelSheet(path,0);
</html>
</body>Regards
Venky
Edited by: Venky_86 on Jun 17, 2009 6:05 AMHOW did you increase the heap space? As that is the only solution you have in this case really.
It is a known fact that POI can use up a lot of memory for big spreadsheets. If at all possible, I would try to switch to plain text comma separated files / tab delimited files. If you cannot do that, I would try to put a size restriction on the sheets that your application will process to get rid of the heap space risk. A sheet can contain 20000 records, or four sheets can contain 5000 records; in both cases you process the exact same data, but at only 25% of the total memory usage. -
One app service getting "java.lang.OutOfMemoryError: Java heap space"
We are running a commercial app on WebLogic 9.2. Two physical servers with 5 application processes running on each in a single cluster. on the server in question, we have 5.5 gigs of free ram at the moment and still getting the message below.
We have 10 app servers and one is getting this message. the full text of it is:
####<Apr 13, 2011 10:58:12 AM CDT> <Warning> <DeploymentService> <lxwbwapa> <workbpr2_node_1a> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1302710292663> <BEA-290064> <Deployment service servlet encountered an Exception while handling the deployment service message for request id "-1" from server "Admin_pr2_a". Exception is: "java.lang.OutOfMemoryError: Java heap space
".>
I dug back through the logs and found it started a couple of weeks ago. I have been able to log into this app server without issue.
Something else I have noticed is that the total heap size for all the app services have shrunk from the initial value of 1.5G - they have all dropped down into the 500 meg range. Is this normal? Why has this one not increased the size of the heap if it is running out of memory?
I could restart the service for this app server but I would not know the cause and since it is a production server where I am not recieving complaints, I am hesitant to go through the res tape to do a re-start.
Any information or past experience with this type issue is greatly appreciated.
Thanks,
WHello,
You might want to post this in the weblogic forum: WebLogic Server - General
as they might be able to explain how WebLogic uses or releases resources.
Regards,
Chris
Maybe you are looking for
-
I have two questions. I want to install Lion. I tried to install more memory I have two 512 MB I try to install a 2 GB stick.that did not work PowerLite flashes. So I'm back to 1 GB. I only have 4 GB left on my 160 GB hard drive. There is nothing on
-
Guys, I need your help, merged layer results to a slight different color compare to its original unmerged layers. the result is that the merged layer has more bluish, What's wrong and what's the solution?. Im using CS3. Any help will be much apprecia
-
Flickering issue with interactive buttons
Hi all, I have an interactive pdf file that is 40 pages long. I have some navigation buttons on each page, which are white triangluar shaped arrows, and they contain black rollover and click states. I am finding however that the buttons states (rollo
-
What does, "swing is not thread safe." mean?
can anyone explain what that means in detail?
-
How to find the session info using the Unix PID
Hi Guys We found in alert log that Some process with Unix pid 3416182 makes some transaction fail. It happened on weekend and now when we try to find it in v$process we did not find any info. Is there any place where oracle stores the PID History whe