web stats
OutOfMemoryError - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2015, 06:09 AM
nesswaw nesswaw is offline
OBX.1 Kenobi
 
Join Date: May 2014
Posts: 42
nesswaw is on a distinguished road
Default OutOfMemoryError

Hello,

I have a File Reader channel, with a large big pdf file size (132mb)

I have an error:

Code:
ERROR (com.mirth.connect.donkey.server.channel.Channel:1021): Error processing message.
java.lang.OutOfMemoryError: Java heap space
I have read this topic https://www.mirthcorp.com/community/...read.php?t=489

But I have not this conf/wrapper.conf file

I must create this file and restart Mirth?

Mirth version 3.0.3

Thanks

Last edited by narupley; 10-19-2015 at 06:59 AM.
Reply With Quote
  #2  
Old 10-19-2015, 07:01 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

You can use the Server Manager to increase the server max heap size. Or, you can edit the appropriate .vmoptions file in the installation directory.
__________________
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 10-19-2015, 07:15 AM
nesswaw nesswaw is offline
OBX.1 Kenobi
 
Join Date: May 2014
Posts: 42
nesswaw is on a distinguished road
Default

Thanks for your response.

It is this parameter => Server Memory? http://img15.hostingpics.net/pics/807316Mirthconf.png

Thanks
Reply With Quote
  #4  
Old 10-20-2015, 12:27 AM
nesswaw nesswaw is offline
OBX.1 Kenobi
 
Join Date: May 2014
Posts: 42
nesswaw is on a distinguished road
Default

Hi,

I have set memory to 2048 Mo, but J have same error

Are there other parameters?

Thanks
Reply With Quote
  #5  
Old 10-20-2015, 06:50 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

You should be using attachment handlers to store large PDFs. Search the forums; many threads already.
__________________
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
  #6  
Old 10-21-2015, 03:14 AM
nesswaw nesswaw is offline
OBX.1 Kenobi
 
Join Date: May 2014
Posts: 42
nesswaw is on a distinguished road
Default

Have you documentation/tuto for attachment handlers?

Thanks
Reply With Quote
  #7  
Old 10-21-2015, 04:32 AM
themochael themochael is offline
OBX.2 Kenobi
 
Join Date: Sep 2013
Posts: 54
themochael is on a distinguished road
Default

How much memory do you have on your machine? I had this same issue and had to change my configs in each of these three:
Mirth Connect\conf\mirth.properties <aministrator.maxheapsize>
\Mirth Connect\mcserver.vmoptions <-Xmx>
\Mirth Connect\mcservice.vmoptions <-Xmx>
Reply With Quote
  #8  
Old 10-21-2015, 06:55 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Quote:
Originally Posted by themochael View Post
How much memory do you have on your machine? I had this same issue and had to change my configs in each of these three:
Mirth Connect\conf\mirth.properties <aministrator.maxheapsize>
\Mirth Connect\mcserver.vmoptions <-Xmx>
\Mirth Connect\mcservice.vmoptions <-Xmx>
That first one is the default client-side max heap size to set when a user downloads the JNLP from the launch page. It's also configurable on the launch page, so users may choose to give their own client more or less heap size as needed. In any case, that setting will not affect the server-side max heap size at all.

The second one is for the "mcserver" executable, and the third one is for the "mcservice" executable. If you've installed Mirth Connect as a service/daemon, then you'll likely need to modify the mcservice file. Otherwise if you're launching mcserver directly then modify the mcserver file. There is no need to modify all three of those, only one (mcserver.vmoptions or mcservice.vmoptions) is needed.
__________________
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 10-21-2015, 07:25 AM
eagledare eagledare is offline
Mirth Newb
 
Join Date: Feb 2010
Posts: 12
eagledare is on a distinguished road
Default

I'm having the same issue; constnatly getting "OutOfMemoryError: Java heap space" while trying to process a load of 2000 pdfs, ranging in size from 2MB to 10MB, with an occasional outlier of 100MB.

I've bumped the service heap space to 20GB. Yes, 20GB, (which I have verified mcservice is using in Task Manager) and I'm still getting these errors constantly. I have three channels:

1. Inbound channel pulls PDFs using SFTP file reader
2. Converts PDF to base64 and inserts into an HL7 message
3. Converts to JSON and makes a post call using Apache HttpClient code.

The errors seem to be generated mostly before channel 1 can even hand off to channel 2. Any help would be greatly appreciated. Right now I'm kind of in shock as to why a server with 20GB of RAM allocated to Mirth can't process a couple thousand PDFs, but maybe I've configured something incorrectly.

My configuration:
Windows 2012 R2
4 core CPU, 32 GB of ram
Mirth 3.3.0.7801
Java v8

Any ideas would be greatly appreciated. I'd even consider moving everything to a Linux server if the problem might be Windows/Java not playing nicely together.
Reply With Quote
  #10  
Old 10-21-2015, 07:28 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Are you using attachment handlers? There's a section in the user guide for them you guise.
__________________
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
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 12:59 PM.


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