Getting error for increasing the Weblogic 10.3.6 heap size to 4 GB - heap-memory

I am using Web logic 10.3.6 and Java 1.7.
My application is running out memory if keep heap space Xmx512m and Web logic is not able to acquire enough memory space when in am increasing to Xmx2048m.
First I have tried with WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m
For this my application is going out of memory at the server start up giving below error in console:
<Jan 26, 2019 4:42:55 PM EST> <Error> <HTTP> <BEA-101216> <Servlet: "InitializerServlet" failed to preload on startup in Web application: "myApp.war".
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuffer.append(StringBuffer.java:237)
Truncated. see log file for complete stacktrace
>
<Jan 26, 2019 4:42:55 PM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application '_appsdir_myApp_war'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "InitializerServlet" failed to preload on startup in Web application: "CUEPrepAndRating.war".
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuffer.append(StringBuffer.java:237)
the server doesn't start if I increase the heap space to set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx2048m
and give below error message:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Can you some one help how I can increase my web logic heap space enough(4GB) so that my application will run without the going out of memory.

You can't. At least not with a 32-bit JDK. See: Maximum Java heap size of a 32-bit JVM on a 64-bit OS - you will not get higher than -Xmx1600m.

Related

How to avoid java.lang OutOfMemory error in Jmeter?

I have been trying to run 50 users in Jmeter, but I see Java.Lang OutOfMemory error in the command prompt once the number of users crosses 35. My machine has a physical memory of 16GB and in-spite of increasing the heap size to 8GB(8192m) in the jmeter.bat file, I still happen to see the same error. I have also disabled the listeners to reduce the memory consumption as well and I used the below heap commands to increase its size.
set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=8192m
I also used a few more alternative commands to increase the heap size which are:
set HEAP="-Xms2g -Xmx2g -X:MaxMetaspaceSize=512m" && jmeter.bat
HEAP="-Xms512m -Xmx4096m"
But I happen a see another error stating
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
errorlevel=1
Can anybody help me in resolving this issue for running a test with 50 users successfully?
Make sure that you have 64-bit Java installation, you won't be able to allocate more than 2 gigabytes to 32-bit JVM
Make sure to use proper syntax as you made a typo and it doesn't looks like you know what you're really doing (setting too high metaspace size will rather cause the problems than fix them):
OutOfMemoryError Exception can have many faces, it's not necessarily connected with insufficient heap, read the stacktrace and eventual .hprof file more attentively
Make sure to follow recommendations from the 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article

Overriding heap memory configuration in Cloud foundry Application

I am using below parameters to override my heap config for JVM -
JBP_CONFIG_OPEN_JDK_JRE: '[memory_calculator: {memory_heuristics: {heap: 65, metaspace: 20}}]'
But I am not able to see the changes getting reflected. Can someone help?
The options you're using only apply for version 3.x of the Java buildpack.
Starting with Java buildpack 4, all you need to do is to set JAVA_OPTS with your JVM configuration options. So if you want to override the max heap size and change the thread stack size, you can do cf set-env my-app JAVA_OPTS '-Xmx100m -Xss228k'.
The Java buildpack will read these values and attempt to adjust the other areas of memory used by the JVM so that it can accommodate running your app within the defined memory limit. If it cannot do that, the Java buildpack will print an error telling you this.
For example, if you set the memory limit to 512M and you set a max heap of 500M, that's not going to work. There won't be enough memory left for other areas of the JVM and the JBP will reject your settings. This is a safety check so to keep your application from exceeding the memory limit and crashing at some point in the future.

sonarqube mssql packet size

I'm using sonarqube 6.1 with MS SQL Server. I tried running a scan on an app that seems to be generating lots and lots of issues. but at the end of the process, it throws the error below:
INFO: CPD calculation finished
INFO: Analysis report generated in 8297ms, dir size=8 MB
INFO: Analysis reports compressed in 1314ms, zip size=2 MB
INFO: ----------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ----------------------------------------------------------------------
INFO: Total time: 1:37.158s
INFO: Final Memory: 50M/481M
ERROR: Error during SonarQube Scanner execution
org.sonarqube.ws.client.HttpException: Error 500 on
http://<server>/api/ce/submit?projectKey=mykey&projectName=pname :
{"errors":[{"msg":"Fail to insert data of CE task somerandomString"}]}
Throughout the Logs, I see some errors parsing some of my css files (which I'm yet to check what's going on) but don;t think that's related. Just mentioning in case it does have something to do with it.
I tried changing my connection string to include Packet Size=65536, but because of the space, not sure if I'm setting it correctly.
I tried
sonar.jdbc.url="jdbc:sqlserver:...;Packet Size=65536"
that blows up and sonar does not start.
Also Tried
sonar.jdbc.url=jdbc:sqlserver:...;"Packet Size=65536" and <BR>
sonar.jdbc.url=jdbc:sqlserver:...;Packet Size=65536
sonar starts, but same error every time.
First of all, is my error realy related to packet sizes? if yes, what's the right way of changing that for sql server? if not, what else can be going on here?
thanks,
Thanks G. Ann.
The root of my problems were on the server logs!

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 259072 bytes)

what is this error mean and how do i over come this?
am getting this error when i run my joomla using Google App Engine. thanks in advance.
Your PHP configuration at the server has a memory limit , which is rather low.
I'd recommend to set it to 32 Mb.
I solve it, by writing down a line in "configuration.php" and "configuration.php-dist":
ini_mem('memory_limit','12M');
For unlimited memory usage of server
ini_set('memory_limit', '-1');

Finding the true memory footprint of a Windows application

I've run into a few OutOfMemoryExceptions with my C#/WPF application and I'm running into some confusing data while attempting to profile the memory usage.
When the app is typically running, Windows Task Manager shows the memory usage as somewhere around 34 MB (bounces around slightly as objects are created and garbage collected). When I run memory profiling applications such as CLR Profiler and dotTrace Memory, they show the total memory usage at around 1.2 MB.
Why this huge discrepancy? What does Task Manager see that these profilers do not?
UPDATE: I added some diag code to my application to print out various memory information every so often via the Process class.
While running my app, I set up a rule in DebugDiag to perform a memory dump in the event of an exception. I forced an exception and the memory dump occurred. At this point, the memory usage of my app (as shown by task manager) jumped from 32 MB to 145 MB and remained there.
You can see this jump in the table below (WorkingSet64). I'm still trying to make sense of all the types of memory info provided by the Process class. How would an external application make the working set of my app grow like this?
Link to data table here.
Using some of the diagnostics tools suggested here, plus the ANTS memory profiler (which is so money) I found the source of the leak.
WPF Storyboard animations leak under .NET 3.5
The WPF BitmapEffect class can cause leaks. The alternative "Effect" class fixes the leak. Link, Link
XAML Merged ResourceDictionaries can cause leak. Link, Link
The "Working Set" memory footprint of an application (memory shown by task manager) is not a good indication of your process' footprint. Outside applications can influence this. Link
The memory profiling tools helped me find that the leaks were mostly in unmanaged code, which made it a real pain to track down. Dealing with these leaks, plus a better understanding of Windows memory (private vs working set) cleared things up.
Prcess Explorer and VMMap, both part of the Sysinternals Suite by Mark Russinovich.

Resources