• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get active FTP connection in Coldfusion

New Here ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

Hi,

I am trying to upload large file 3-5 Gb to the ftp server and when i upload more then 2 larger files in parallel it stops the CF server, is there a way to see the number of active FTP connection so that i can restrict the user to not upload more then 2 files in parallel.

Thanks in advance everyone.

Views

309

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

What is your ColdFusion version and update level? Generally, the settings for maximum number of request threads and maximum size of post data can be found in the Server Settings page in the ColdFusion Administrator. You should test by changing the settings.

 

Do you want a fine-grained view of the connections? Then you should monitor your application with FusionReactor or with Adobe's own Performance Monitoring Toolset. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

Can you provide some additional information on what you're doing, along with your version number etc that @BKBK asked for? My feeling is that you're really overworking the CFFTP tag, if that's what you're using. I'd try to extract the FTP functionality from your CF app, so that CF is responsible for putting files in a given directory, then you're using your own command-line script that tracks the files currently being FTPd, and that script uses a command-line FTP client to actually move the files. I'm a little hazy on how you'd track the files being moved, but am fairly confident it's doable.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2023 May 19, 2023

Copy link to clipboard

Copied

Hi Dave,

Server ProductColdFusion 2016
Version2016.0.03.300466

This is code that i am using currently:

<cfset variables.uploadedFileServerName = "TestUploadFile" & "/" & "#fileName#" />
<!---<cfset fileName =  uploadResult.serverfile/>--->
 
<cfftp connection="session.ftpConn"
action="open"
server="uploaduat.flexnetoperations.com"
username="someusername"
password="somepassword"
stoponerror="Yes"
timeout="90000">
Did it open connection? <cfoutput>#cfftp.succeeded#</cfoutput><br />
<cfif cfftp.succeeded>
 
<cfftp connection = "session.ftpConn"
action = "PutFile"
localFile="#form.FileContents#"
remoteFile="#variables.uploadedFileServerName#"
stoponerror="Yes"
passive = "Yes"
timeout="90000">
<P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
<cfif CFFTP.Succeeded>
<P>Close the connection:
<CFFTP ACTION="close"
CONNECTION="session.ftpConn"
STOPONERROR="Yes">
<P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
<cfset form.FileContents = ""/>
<cfset fileId = URL.fileId/>
<script type="text/javascript" language="JavaScript">
    <cfoutput>
Maximum number of POST request parameters  
Maximum number of parameters in a POST request sent to the server. ColdFusion rejects requests if the POST parameters exceed the limit you specify.

Maximum size of post data   MB
Limits the amount of data that can be posted to the server in a single request. ColdFusion rejects requests larger than the specified limit.

Request Throttle Threshold   MB
Requests smaller than the specified limit are not handled by the throttle.

Request Throttle Memory   MB
So, when i upload more than 2-3 large files around 3-5GB it hangs and stops the coldfusion server, so i want if there is a way to see i there are two ftp connections are opened or two active requests then user does not upload the third file. what could be the possible solution.
Thank you so much for help in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2023 May 19, 2023

Copy link to clipboard

Copied

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2023 May 19, 2023

Copy link to clipboard

Copied

Thanks for the information.

More information required to give a clearer picture:

  • the Operating System's RAM memory.
  • the JVM settings used by the ColdFusion instance. That is, the value of java.args in /{CF_INSTANCE}/bin/jvm.config

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2023 May 20, 2023

Copy link to clipboard

Copied

LATEST

@Akash299451589siy , I now have second thoughts. My suggestion is:

  1.  Update ColdFusion 2016 to the highest update level. 
    ColdFusion 2016 was upgraded right up to Update 17. You are apparently on ColdFusion 2016 Update 3, which is far out of date. There were many changes between Update 3 and Update 17. Some of the changes undoubtedly have an impact on FTP. Some directly, like Update 6, others indirectly. 

  2.  Run the FTP code on the updated ColdFusion server. Return to the forum and share the result.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation