web stats
Sending files to Http Listener EOF Error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2018, 12:39 PM
drobertson drobertson is offline
Mirth Newb
 
Join Date: Aug 2018
Posts: 9
drobertson is on a distinguished road
Default Sending files to Http Listener EOF Error

I'm trying to send files along with my xml from a windows service to Mirth. I'm getting EOF errors when it hits the channel. If I increase the max heap size, it stops happening and processes correctly. I'm not sending huge files, but it is requiring a max heap size of around 4 gigs to handle about 20mb of file size. I obviously don't want that. Is there some trick here that I'm missing?
Reply With Quote
  #2  
Old 10-08-2018, 01:20 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 476
agermano is on a distinguished road
Default

Maybe look into using mirth attachments to make your messages smaller. Mirth can keep several copies of your message in memory at once.

Does the error prevent the message from ever being created or does it happen during processing?

Are you ever sending multiple http requests from your windows service simultaneously? That could increase memory requirements as the web server (jetty) is multi-threaded even if your channel is not.
Reply With Quote
  #3  
Old 10-08-2018, 01:33 PM
drobertson drobertson is offline
Mirth Newb
 
Join Date: Aug 2018
Posts: 9
drobertson is on a distinguished road
Default

The message isn't even showing up in the channel log when it errors out, so I'm not sure if making it an attachment would help. I'm not very familiar with them. I assume this is what you were asking with your second question?

There shouldn't ever be multiple messages being sent to the channel at the same time.

It hits the channel fine if I make incoming raw. I just really don't want to lose all of my transformer steps.
Reply With Quote
  #4  
Old 10-08-2018, 02:30 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 476
agermano is on a distinguished road
Default

Attachments can lower the overall memory footprint of your channel (as well as reduce processing time and db storage.)

You are correct that attachments won't do anything for you until after a message has actually been dispatched, but changing your inbound type to Raw won't either. The attachment handler is the very first thing that runs after the message is dispatched. It runs before the pre-processor, which runs before your source filter/transformer where the inbound data type is used.

Can you give a little more information about how your channel is set up, your message format, how you are including the files, etc...?

Does this help at all? https://stackoverflow.com/questions/...ing-large-file
Reply With Quote
  #5  
Old 10-09-2018, 06:20 AM
drobertson drobertson is offline
Mirth Newb
 
Join Date: Aug 2018
Posts: 9
drobertson is on a distinguished road
Default

Changing the inbound type to Raw does make this work. I'm not positive on the why. I know xml has a little more overhead than Raw, but I didn't think it was that much.

I'm sending the xml to a channel with inbound type xml by opening a TCP Client stream from a windows service. The attachments are being sent to the channel as byte arrays.

Last edited by drobertson; 10-09-2018 at 08:22 AM.
Reply With Quote
  #6  
Old 10-09-2018, 11:10 AM
drobertson drobertson is offline
Mirth Newb
 
Join Date: Aug 2018
Posts: 9
drobertson is on a distinguished road
Default

I think I've figured it out. The connection kept being broken before it completed sending data. So now I've got to make use of attachments now that I'm getting all of the data to hit the channel. I appreciate the help.
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 01:22 AM.


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