Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-08-2018, 02:36 PM   #1
LQ Newbie
Registered: Sep 2018
Posts: 9

Rep: Reputation: Disabled
lftp - Limit new connections per unit time

I regularly download from a remote server using lftp. Somewhere between the server and me the speed per connection is being limited. The only solution I've found is to use lots of connections and lftp is great for this. The only issue is I see a number of connections that get delayed for a minute or more, I assume because either ssh on my end or the ftp server on the other end won't accept more than X connections per Y seconds from the same source. So I'm wondering if there's a way to pace the new connections made by lftp. I know I can limit the total connections, but what I want is to limit it to, say, one new connection per second. I still want 16 connections per file, I just want lftp to pace itself making those connections. I've looked through the available settings several times and nothing jumps out at me on how to do this. Is it possible?
Old 09-09-2018, 08:04 AM   #2
Senior Member
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,444
Blog Entries: 3

Rep: Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215
According to the manual page you should be able to set the vairable net:connection-limit to cap the maximum number of concurrent connections. If that works then you can make it permanent in ~/.lftprc or ~/.lftp/rc.

man lftp
Though that such sets the number not the rate at which they are opened.

Last edited by Turbocapitalist; 09-09-2018 at 08:06 AM.
Old 09-09-2018, 01:50 PM   #3
LQ Newbie
Registered: Sep 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks, but I'm aware of that setting. I want the connections to be made, just not all at the same time. I have an alias set up that queues a single file download with pget using 16 connections. If I do 'job' right after running the queue command I see that 13 of the connections have been established and are downloading. Three of the connections say "Delaying before reconnect" with a number of seconds remaining. It seems to start at 30 seconds and count down. On the second try the remaining three connections are made. While it's obviously not the end of the world, I'm seeing that 30 seconds as wasted time and I'd like to find a way for those connections to be made faster. There clearly needs to be some delay but I'm guessing 30 seconds is much longer than it needs to be.

There are some settings related to "dynamic connections" but I've not yet found a good explanation of how they work.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can start LFTP at x tme - but can i kill process at x time CharzelPernell Linux - Newbie 6 03-26-2015 01:36 PM
what is time unit on NS2 trace file moreroz Linux - Wireless Networking 0 11-28-2014 11:48 PM
Limit The SSH connections!!! anishkumarv Linux - Server 1 07-14-2011 03:11 AM
Need a way to limit TCP connections ewerta Linux - Networking 1 07-25-2005 04:54 PM
limit connections Smokey Slackware 1 10-13-2004 03:22 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration