WebLogic10.3 OutOfMemoryError - weblogic-10.x

Weblogic 10.3 gives out of memory
Followings thing I have done
Increased the -Xms512m
Increased the -Xmx1024m
Increased the max perm size in setdomainenv.bat
Is there any other way to resolve this issue I have a 2 GB system?
It is a production machine and the size of the log is around 4 GB .When analysed the log I found many connection refused error

You'll need to profile your application to find the memory leak. It could be open database connections or other resources not being handled properly
Just increasing the Xms and Xmx wont work beyond a point
Take a Heap Dump into an HPROF file and run this using Eclipse Memory Analyzer Tool or VisualVM
or monitor this using JConsole

Related

Docker image does not run

I just downloaded a new docker image. When I try to run it I get this log on my console
Setting Active Processor Count to 4
Calculating JVM memory based on 381456K available memory
unable to calculate memory configuration
fixed memory regions require 654597K which is greater than 381456K available for allocation: -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=142597K, -XX:ReservedCodeCacheSize=240M, -Xss1M * 250 threads
Please, how can I fix this?
I am assuming that you have multiple services and you are going to start them at a time. The issue is related to memory which docker and spring boot uses.
Try this:
environment:
- JAVA_TOOL_OPTIONS=-Xmx128000K
deploy:
resources:
limits:
memory: 800m
You have to provide memory which I mentioned in the .yaml file syntax.
While at the time of startup each service takes lot of memory, so there is no memory remaining for rest of the services and because of that other services starts failing with the memory related message.

JMeter - out of memory on linux RH 7.5

I am trying to run a load test for a application. For this i am using JMeter (v4 & v5) on linux Red hat 7.5 Vm with 16GB Ram and 8vCPU power. Goal is to reach 20k Users connected via ยต-service.
However during the test runs i get the following errors on the console:
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread.
Here is my jvm jmeter configuration :
cat bin/jmeter | grep HEAP
HEAP (Optional) Java runtime options for memory management
: "${HEAP:="-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m"}"
Any ideas?
I tried changing the heap size in jmeter, but that didn't seem to help at all.
unable to create new native thread is not something you can work around by increasing JVM Heap, you're going above maximum number of threads threshold which is defined on OS level.
You will need to amend nproc value via ulimit command or by modifying /etc/security/limits.conf file to look like:
your_user soft nproc 1024
your_user hard nproc 32768
Reference: Unable to create new native thread
If you will be still receiving this error after raising maximum number of processes on OS level - most probably you will have to go for Distributed Testing

AWS EMR Hadoop Mapreduce physical memory limit error

I keep getting this error when running some of my steps:
Container [pid=5784,containerID=container_1482150314878_0019_01_000015] is running beyond physical memory limits. Current usage: 5.6 GB of 5.5 GB physical memory used; 10.2 GB of 27.5 GB virtual memory used. Killing container.
I searched over the web and people say to increase the memory limits. This error is after I already increased to the maximum allowed on the instance I'm using c4.xlarge. Can I get some assistance about this error and how to solve this?
Also, I don't understand why mapreduce will throw this error and won't just swap or even work slower but just continue to work ...
NOTE: This error started happening after I changed to a custom output compression so it should be related to that.
Thanks!

Spring Cloud microservices memory usage

I'm running multiple microservices (Spring cloud + docker) in small/medium machines on AWS and recently I found that these machines are often exhausted and need rebooting.
I'm investigating the causes of this loss of power, thinking of possible memory leaks or misconfigurations on the instance/container.
I tried to limit the amount of memory these containers can use by doing:
docker run -m 500M --memory-swap 500M -d my-service:latest
At this point my service (standard spring cloud service with one single endpoint that writes stuff to a Redis DB, using spring-data-redis) didn't even start.
Increased the memory to 760M and it worked, but monitoring it with docker I see the minimum is:
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
cd5f64aa371e 0.18% 606.9 MiB / 762.9 MiB 79.55% 102.4 MB / 99 MB 1.012 MB / 4.153 MB 60
I added some parameters to limit the JVM memory heap but it doesn't seem to reduce it very much:
_JAVA_OPTIONS: "-Xms8m -Xss256k -Xmx512m"
I'm running
Spring Cloud Brixton.M5
Spring Boot 1.3.2
Java 8 (Oracle JVM)
Docker
Spring data Redis 1.7.1
Is there a reason why such simple service uses so much memory to run? Are there any features I should disable to improve that?
We've investigated a number of things in a similar setup in terms of the JVM itself. A quick way to save some memory if using Java 8 is to use the following options:
-Xms256m -Xmx512m -XX:-TieredCompilation -Xss256k -XX:+UseG1GC -XX:+UseStringDeduplication
The G1GC is well documented, the UseStringDeduplication reduces heap usage by de-duplicating the storage of Strings in the heap (we found about 20% in a JSON/XML web service type environment), and the TieredCompilation makes a big difference in the use of CodeCache (from 70Mb down to 10Mb), as well as about 10% less Metaspace at the expense of about 10% startup time.
According to Spring's Installing Spring Boot applications page you can customize the application startup script by either environment variable or configuration file with the JAVA_OPTS variable.
For example: JAVA_OPTS=-Xmx64m

SQLServer using too much memory

I have installed on my desktop machine (with windows 7) SQLServer 2008 R2 Express.
I have only one local server running (./SQLEXPRESS) but the sqlserver process is taking ALL the RAM possible.
With an machine with 3GB of RAM the things starts to get slow, so I limited the maximun amount of RAM in the server, and now, constantly the SQLServer give some error messages that the memory is not enought. It's using 1GB of RAM with only one LOCAL server with 2 databases completely empty, how 1GB of RAM isn't enought ?
When the process start it's using an really acceptable amount of memory (around 80MB) but it's keep increasing until it reaches the maximun defined and start to complain about having not enought memory available. In that point I have to restart the server to use it again.
I have read about an hotfix to solve one of the errors I got from sqlserver:
There is insufficient system memory in resource pool 'internal' to run this query
But it's already installed on my sqlserver.
Why it's using so much memory?
You can try configuring the 'max server memory' configuration option:
For additional details check:
http://technet.microsoft.com/en-us/library/ms178067(v=sql.105).aspx
http://support.microsoft.com/kb/321363
http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/df51cd87-68ce-439a-87fa-d5e5cd93ab31
I had the problem like this.
You can increase the cache size of DB.
On MSSQL server properties, choose memory, there have "maximum server memory (in MB)" You can increase this cell.
Or same thing with query:
EXEC sp_configure'Show Advanced Options',1;
GO
RECONFIGURE;
GO
EXEC sp_configure'max server memory (MB)',3500;
GO
RECONFIGURE;
GO

Resources