web stats
Caused by: java.lang.OutOfMemory - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2014, 02:51 PM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Question Caused by: java.lang.OutOfMemory

Unable to deploy all my channels....

at com.mirth.connect.server.Mirth.run(Mirth.java:154) Caused by: java.lang.OutOfMemoryError: unable to create new native thread
Reply With Quote
  #2  
Old 05-14-2014, 02:58 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by StickyBandit View Post
Unable to deploy all my channels....

at com.mirth.connect.server.Mirth.run(Mirth.java:154) Caused by: java.lang.OutOfMemoryError: unable to create new native thread
Sounds like you're running out of memory on the machine you're running the server on. You probably need to increase your max heap size. It's also possible that something you're doing is spawning endless threads until the JVM can't allocate resources for any more.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 05-15-2014, 08:08 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Default administrator.maxheapsize

I changed this setting from the default of 512m to 2048m in mirth.properties.

# The following properties were automatically added on startup - they are required beginning in version 3.0.2
administrator.maxheapsize = 2048m

Is this going to provide more memory or take away memory?
Reply With Quote
  #4  
Old 05-15-2014, 08:28 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by StickyBandit View Post
I changed this setting from the default of 512m to 2048m in mirth.properties.

# The following properties were automatically added on startup - they are required beginning in version 3.0.2
administrator.maxheapsize = 2048m

Is this going to provide more memory or take away memory?
No that's the client-side max heap size, not the server-side. To change the server-side map heap size you would do that in the Server Manager or by editing the vmoptions file.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 05-15-2014, 08:30 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Default

I set the server side to these settings...
-server
-Xmx2048m
-Djava.awt.headless=true
Reply With Quote
  #6  
Old 05-15-2014, 09:52 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Default

I have not found a memory leak yet, but I have to stop and start the server like 3 or 4 times, then finally all the channels will get deployed.

I don't have this problem on my local windows machine with Mirth/derby and the same channels.

Last edited by StickyBandit; 05-15-2014 at 09:55 AM.
Reply With Quote
  #7  
Old 05-15-2014, 10:16 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Default

I rebooted the entire linux machine and still 2 channels did not deploy.

[2014-05-15 12:14:53,389] ERROR (com.mirth.connect.server.controllers.DonkeyEngine Controller:191): Error deploying channel 024ea80b-b795-4d23-9dd1-bcb6bf8d615e.
com.mirth.connect.donkey.server.StartException: java.lang.OutOfMemoryError: unable to create new native thread

It seems like -Xmx2048m did more harm than good, before with the default setting they would all deploy.
Reply With Quote
  #8  
Old 05-15-2014, 10:29 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Are you sure you don't have some kind of infinite loop or something in one of your channels?
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #9  
Old 05-28-2014, 08:13 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Default

Still have this original problem deploying channels on startup.

[2014-05-28 10:11:48,538] ERROR (com.mirth.connect.server.controllers.DonkeyEngine Controller:191): Error deploying channel e57d29a9-a3e8-4fed-9552-25e03bc0d547.
com.mirth.connect.donkey.server.StartException: java.lang.OutOfMemoryError: unable to create new native thread


I have to deploy each channel manually one at a time to get them all deployed.

Last edited by StickyBandit; 05-28-2014 at 08:21 AM.
Reply With Quote
  #10  
Old 05-28-2014, 01:23 PM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 955
StickyBandit is on a distinguished road
Wink Not a Mirth bug.

I think this problem is resolved. The linux machine allocated to us was one of the virtual servers. And it was setup with only 1GB memory. No wonder Mirth was throwing out of memory errors left and right.


This is why programmers don't like the virtual Servers. 15 years ago we used to have servers that had many times the power of what our workstation had.
Now we have workstations that are 100 times more powerful than the servers.
Virtual servers have become somehow a justified way to setup a lousy server, one you would never buy, and not really a server machine at all. Weaker than what we would have used over 15 years ago with a hardware server.
They setup the weakest server possible and then you have to keep requesting improvements. The default now is slow and low memory until you fix it. Before virtual servers this was not the case. Servers were setup to be powerful servers.

This answer was provided above. I just assumed that our server was setup with a decent amount of memory, like 8-16GB. (never assume)

Last edited by StickyBandit; 05-28-2014 at 01:31 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation