Space issue when starting Weblogic server - java

we are trying to start our application server(Weblogic) but the below error comes up and we are unable to start it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; sup
port was removed in 8.0
Error occurred during initialization of VM
Could not reserve enough space for object heap
Can you please advise. Thanks in advance.

These are 2 different errors resulting from their individual configurations.
For this warning:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=512M; sup port was removed in 8.0
The MaxPermSize configuration was a Hotspot specific setting to specify the maximum perm-gen space for storing class files. You should either check your Server -> Server start -> Arguments if there is a -XX:MaxPermSize included that can be removed or you could check your startup scripts if specified there.
See this for details.
For this error:
Could not reserve enough space for object heap
This results from heap allocation not enough. You need to add a -Xmx512m or an appropriate higher value.

Related

OpenJ9 tomcat won't start with high -Xmx heap option

I have a Spring app running in a Tomcat 9.0.6 on Linux 64. Because it needs a lot of memory, I would like to try the OpenJ9 JVM which is supposedly more efficient in that regard (current heap limit with Hotspot: -Xmx128G).
I installed the 64-bit adoptopenjdk-8-jdk-openj9:
/usr/lib/jvm/adoptopenjdk-8-jdk-openj9/bin/java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
Eclipse OpenJ9 VM (build openj9-0.14.2, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20190521_315 (JIT enabled, AOT enable
OpenJ9 - 4b1df46fe
OMR - b56045d2
JCL - a8c217d402 based on jdk8u212-b04)
Starting the tomcat causes the following error:
This JVM package only includes the '-Xcompressedrefs' configuration. Please run the VM without specifying the '-Xnocompressedrefs' option or by specifying the '-Xcompressedrefs' option.
After I set this option I get the following error:
JVMJ9GC028E Option too large: '-Xmx'
JVMJ9VM015W Initialization error for library j9gc29(2): Failed to initialize
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Documentation isn't that clear, but I found this:
https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/mm_gc_compressed_refs.html
Compressed references are used by default on a 64-bit IBM SDK when the value of -Xmx, which sets the maximum Java heap size, is in the correct range. Start of changes for service refresh 2 fix pack 10On AIX®, Linux and Windows systems, the default range is 0 - 57 GB. For larger heap sizes, you can try to use compressed references by explicitly setting -Xcompressedrefs.End of changes for service refresh 2 fix pack 10 However, larger heap sizes might result in an out of memory condition at run time because the VM requires some memory at low addresses. You might be able to resolve an out of memory condition in low addresses by using the -Xmcrs option.
So basically, at least this build of the JDK only supports compressedrefs, and in order to use that, I must set it manually since my Xmx is above the range where it is enabled by default, but that fails because my OS already allocated to much of <4GB memory ranges, but some is needed to use compressedrefs. Since I can never guarantee that that won't be the case, is there any way I can use OpenJ9 without compressedrefs? And will that even yield the benefits in terms of memory consumption? Or is there any way I can use compressedrefs with very high Xmx settings?
I also tried setting this option, but it didn't help: https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/openj9/xmcrs/index.html?view=embed
How do I find the correct size for it? 1G and 64m failed. Even if I find the correct setting, how would this value guarantee that the OS hasn't already allocated all the lower memory addresses?
The limit to use the compressed refs JVM is 57G and you can't run it if the -Xnocompressedrefs option is specified.
The 57G division is documented here: https://www.eclipse.org/openj9/docs/xcompressedrefs/
The -Xnocompressedrefs problem is mentioned in the release notes: https://github.com/eclipse/openj9/blob/master/doc/release-notes/0.15/0.15.md
With a reference to: https://github.com/eclipse/openj9/issues/479
Creating a single JVM that supports both is covered by: https://github.com/eclipse/openj9/issues/643
https://github.com/eclipse/openj9/pull/7505
(With thanks to the help from the Eclipse OpenJ9 slack community, especially to Peter Shipton)
I found this build which allows noncompressedrefs and thus solves my issues: https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=openj9#linuxxl

Installed Elasticsearch 5.5 and failed to start the service

Installed elasticsearch v5.5 in centos and ran the following command to initiate the service.
sudo service elasticsearch start
Getting following error while running the above command.
Starting elasticsearch: OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid15359.log
Suggest me how to fix this.
Elasticsearch starts with 2 GB of RAM as default in 5.X versions.
Assuming that you are using virtual machine, it seems like your VM has less free memory than 2GB. Try giving your VM more memory or change your Elasticsearch JVM settings in /etc/elasticsearch/jvm.options (for example set -Xms512m -Xmx512m).

Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file

I am working on Linux for Mitrh and when I shutdown Apache server it gives following error:
And when I check for filesystem-
I dont know how to use /dev/sdb1/ that is 99% available
This might be a little late. But, changing the tmp file location to a place with more space for JVM could solve your problem:
export JAVACMD_OPTIONS="-Djava.io.tmpdir=/path/to/temp/directory/with/more/space";
Hope this helps

Jenkins: Out of memory issue

Suddenly I have started getting following error from integration test cases. Using Java 8 so I added MAVEN_OPTS = -Xmx512m. But it did not work. What am I missing here and how can I fix it? Between it works fine on local machine.
SUREFIRE-859: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c9800000, 54001664, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 54001664 bytes for committing reserved memory.
# An error report file with more information is saved as:
Looking at the error message, it looks like Java was not able to allocate enough memory, i.e. it's not Java's heap limit that's in the way but rather no more memory available to be given to Java by OS. Check that the machine is not running out of memory.

Eclipse: "Could not reserve enough space"

So I'm doing a minecraft mod in java in eclipse and any time I wanted to start it in eclipse for testing it doesn't work and I get the following output:
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
What can I do? Obviously this problem is not about the RAM not being there, I've got 6GB, it's about java not being allowed to take it.

Categories