web stats
FTP connection behaviour - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2010, 06:12 PM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default FTP connection behaviour

Evening, my cousin is using Mirth to regularly poll an FTP site for XML files. The FTP provider is picky about the number of connections to their server.

They prefer that either:
- a persistent connection be used
OR
- that if there is a new connection made for each poll that it is closed/quitted cleanly rather than idled (because apparently they can't just set the connect timeout like normal people)

With a file source connector in FTP mode, will Mirth behave in one of the manners described above?
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #2  
Old 05-26-2010, 11:51 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 142
mnowlin is an unknown quantity at this point
Default

Wait a minute... A Mirth employee asking a question like this, and it's for his *cousin*??? Sounds like one of those "Doctor, I have a friend who has this problem" things...

I just ran a quick test, and yes, Mirth is leaving the FTP connection open. I'd actually consider this to be a bug, or at least something that should provide a "promptly close FTP connection" option in the channel definition. Relying on the remote server timing out the connection just seems wrong to me.

I really don't see a clean way of doing this in Mirth as it stands now. Persistent connections simply aren't reliably "persistent" due to routers along the way closing idle connections, NAT session timeouts, etc.

For two of my FTP connections, I send the files via FTP from Mirth to a local Linux box, which runs a Perl script every two minutes that FTP's the files to a remote server, properly closing the FTP connection when it finishes. Is the reverse something that could solve your problem?

mike
Reply With Quote
  #3  
Old 05-27-2010, 06:20 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default

Quote:
Originally Posted by mnowlin View Post
Wait a minute... A Mirth employee asking a question like this, and it's for his *cousin*??? Sounds like one of those "Doctor, I have a friend who has this problem" things...
Hahah you caught me :P. Was easier to just ask than have my cousin make his own account.

Quote:
For two of my FTP connections, I send the files via FTP from Mirth to a local Linux box, which runs a Perl script every two minutes that FTP's the files to a remote server, properly closing the FTP connection when it finishes. Is the reverse something that could solve your problem?
Thanks for running that test. I didn't have immediate access to an FTP server to check it myself.

It does sound like a script may be the way to go. I'll twist some arms around here and see if I con [beg] someone into slipping this into 2.0 .
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #4  
Old 05-27-2010, 09:23 AM
geraldb geraldb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 314
geraldb is an unknown quantity at this point
Default

The File Connector uses connection pooling for the S/FTP connection types to reduce the overhead of having to create a new connection each time a file is sent. We can look into adding an option to actually close the connection after each file for low message rates.
__________________
Gerald Bortis | Chief Information Officer | Mirth Corporation
Reply With Quote
  #5  
Old 05-27-2010, 09:50 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default

So if it uses connection pooling is it only ever using one connection?
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #6  
Old 05-27-2010, 09:40 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 142
mnowlin is an unknown quantity at this point
Default

Just tested... With no open FTP connection, Mirth created one (and left it open) when I sent a message to the channel. Sending a second message about a minute later used the previously-opened connection.

It looks like Mirth checks for and uses an active FTP session if possible. If not, it opens a new one.
Reply With Quote
  #7  
Old 05-27-2010, 09:49 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 142
mnowlin is an unknown quantity at this point
Default

Quote:
Originally Posted by jbartels View Post
I'll twist some arms around here and see if I con [beg] someone into slipping this into 2.0 .
Running around the office wearing sun-god robes and throwing little pickles at everyone is usually an effective technique.
Reply With Quote
  #8  
Old 05-28-2010, 05:52 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default

Around here we just call that "Tuesday".
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
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 06:44 AM.


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