Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
My TW Connector crashes after a while. This is the error I get:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/Thingworx-Azure-IoT-Hub-Connector-2.0.0.141/connector/bin/hs_err_pid15517.log
# [ timer expired, abort... ]
Aborted (core dumped)
At first site this looks like a memory lead for me. The Connector runs on a VM (7GB Memory) and I think the resources should be enough for a dev env. I have connected just one agent and there is not much stress on the Connector.
Are there are any Java settings recommended for running the Azure Connector?
Thanks
The error message:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
is indicating that JVM is not able to allocate physical memory in your system.
before running ioT Connector find out how much free memory is available in your system using top
and sort by resident memory (upper-case letter O
, then q
), and possibly stop some of them to free up more for running IoT Connector in JVM.
I was not able to identify the process using top, but I have the resource usage from thingworx:
The issue is not with ThingWorx rather your OS not able to allocate memory so output from Thingworx resource usage page is not helpful. Can you provide output from top as explained earlier instead?
Logical and most likely solution to update memory in your VM as 7GB doesn't seams to be enough to run whatever processes you have running.
I am running just the TW platform and the TW Azure connector on my VM.
It is not so much what you are running but how much memory you have allocated to different Java applications as the total cannot cannot exceed available free physical memory. You have total of 8GB of physical memory and from top I can see:
~6GB used by one Java process
~4.5GB used by another Java process
~1.2GB used by omsagent
~1Gb used by the OS
total of 12.7GB so you need more than 8GB VM to run what you current running.
Now Thingworx requirement is min of 16GB, you can run in less by updating Xmx value for your Java apps to something like 4GB to make sure that you do not allocate more that your total available free memory but expect degraded performance because of that.
Thanks for you reply Marek. The 6GB process is the TW platform and the 4.5GB process is the TW connector. I will allocate less memory for these processes. I have not implemented any logic on the platform. I have just some remote devices mapped. It should not require too much resources.
Hi @stanislav.
If one of the previous responses allowed you to resolve your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same issue.
Regards.
--Sharon
The problem is still not solved.
Since the issue is still not resolved, can you explain what changes have you made and if the error has changed? If it did please provide current error message?