Hi,
I have a B4J server app compiled with Open JDK 14.
I want to install this app on a VPS, so I followed the steps here: https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/
This links to the post here which suggests that I would need to download the OPEN JDK from this link https://b4xfiles-4c17.kxcdn.com/b4j/linux_jdk-14.0.1.zip
I uploaded and extracted these files,
I uploaded the compiled jar, (F5 in release mode)
The server starts up ok, but when I try to communicate with it I get the following error:
Any idea what I should do to resolve this.
Note: the server works perfectly on a local Windows machine.
BTW, I have run the program on OPENJDK 14 and OPENJDK 11 runtime with the same results.
I have a B4J server app compiled with Open JDK 14.
I want to install this app on a VPS, so I followed the steps here: https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/
This links to the post here which suggests that I would need to download the OPEN JDK from this link https://b4xfiles-4c17.kxcdn.com/b4j/linux_jdk-14.0.1.zip
I uploaded and extracted these files,
I uploaded the compiled jar, (F5 in release mode)
The server starts up ok, but when I try to communicate with it I get the following error:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 24 bytes for AllocateHeap
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:46), pid=23747, tid=23770
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
--------------- S U M M A R Y ------------
Command Line: myB4JServer.jar
Host: x86_64, 4 cores, 5G, x86_64
Time: Mon Aug 1 07:46:05 2022 UTC elapsed time: 112 seconds (0d 0h 1m 52s)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 24 bytes for AllocateHeap
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:46), pid=23747, tid=23770
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
--------------- S U M M A R Y ------------
Command Line: myB4JServer.jar
Host: x86_64, 4 cores, 5G, x86_64
Time: Mon Aug 1 07:46:05 2022 UTC elapsed time: 112 seconds (0d 0h 1m 52s)
Any idea what I should do to resolve this.
Note: the server works perfectly on a local Windows machine.
BTW, I have run the program on OPENJDK 14 and OPENJDK 11 runtime with the same results.