Ftp: Limit the number of simultaneous connections

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Ftp: Limit the number of simultaneous connections

Post by *raytc »

Every time I use ftp (TC) to put files on my server or download them the connection breaks and my IP address is blocked by the hoster.

Each time it appears that it is because there are too many open connections.
They recommend me to use FileZilla because in FileZilla you can limit the number of simultaneous connections and set it to the maximum number of connections (is 8 or 10 if I'm not wrong).

Can I do the same in TC?
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Ftp: Limit the number of simultaneous connections

Post by *Dalai »

If you transfer files in the foreground (F5, Enter), TC uses a single connection. If you transfer files in the background (F5, F2), the number of connections depends on how many background transfers there are. Thus you can limit the number of connections by controlling the number of background transfers. If there's only one background transfer window open, TC uses two simultaneous connections at most: one in the foreground and one in the background.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Re: Ftp: Limit the number of simultaneous connections

Post by *raytc »

Dalai wrote: 2022-06-17, 12:28 UTC If you transfer files in the foreground (F5, Enter), TC uses a single connection. If you transfer files in the background (F5, F2), the number of connections depends on how many background transfers there are. Thus you can limit the number of connections by controlling the number of background transfers. If there's only one background transfer window open, TC uses two simultaneous connections at most: one in the foreground and one in the background.

Regards
Dalai
Thank you for writing.
I used F5.
I asked my hoster.
240 open connections.

I downloaded winscp and tried it again (changed the number of background connections to 1).
160 open connections.

In both case my IP was blocked.

I still don't know what to do or maybe I haven't understood your reply.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Ftp: Limit the number of simultaneous connections

Post by *Hacker »

raytc,
There is not really any reason why there should be 160 or 240 simultaneous connections. As this does not seem to be a problem with TC (nor with WinSCP I'd guess), the only option that comes to mind is to troubleshoot on a deeper level using some kind of netstat tool perhaps in tandem with a network packet capture tool (tcpdump, Wireshark or similar).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Ftp: Limit the number of simultaneous connections

Post by *Stefan2 »

2raytc

Had you double checked with FileZilla too?





 
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Ftp: Limit the number of simultaneous connections

Post by *Dalai »

There's one more thing: If you really want to transfer files in the foreground, don't enable the option "Download in background (separate thread)" in the FTP Download dialog which appears after pressing F5. Obviously, enabling this option will also open another connection, and AFAIK it will open a separate background transfer, i.e. in addition to any running background transfers.

Since you also tried WinSCP without much success, I suggest to check if any firewall software could be interfering. If you don't find any, see Hacker's suggestions (though you need to know how to handle network sniffing tools if you go that route).

Regards
Dalai
Last edited by Dalai on 2022-06-20, 11:45 UTC, edited 1 time in total.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Re: Ftp: Limit the number of simultaneous connections

Post by *raytc »

Stefan2 wrote: 2022-06-20, 10:46 UTC 2raytc

Had you double checked with FileZilla too?
I have not used Filezilla yet.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Ftp: Limit the number of simultaneous connections

Post by *ghisler(Author) »

FTP uses a separate data connection for each transfer of a file or directory listing. So if you transfer 200 files, it would open (and close!) 200 connections sequentially. There should never be more than 2-3 connections open at the same time.

However, after a transfer when the connection gets closed, Windows sends a "close gracefully" packet and the server then closes the connection. If this package gets filtered out by a firewall or so, the connection will stay open and will timeout much later.

Your options are:
1. Try to find out why the data connections don't get closed when they are done
or
2. Try using SFTP to connect to the server. This protocols use a single connection (SSH2 secure shell) which is then used for both commands and data. The server will have to support it, and you will need my SFTP plugin to use it.
Author of Total Commander
https://www.ghisler.com
rahuebner
Junior Member
Junior Member
Posts: 3
Joined: 2022-07-15, 13:56 UTC

Re: Ftp: Limit the number of simultaneous connections

Post by *rahuebner »

Hi, and hello, this is my first post as new registered user :-). I was searching for a kind of "Here I'm, the new one", but there seems not to be such a thread ;-).

Anyways, I have exactly the same issues with a webhosting provider of a customer (alfahosting.de). The FTP Service is reporting "530 Bitte nicht mehr als 4 Verbindungen" in a friendly German message, strange to see, but true :-).
I get the same behavior in Filezilla, even after limiting the threads to 1.

In my eyes, there is a misconfiguration on the server side, maybe they are not counting the active connections in the right way.

I haven't this kind of issue in years on other providers, so maybe there is no issue with TC, but more with the setup on some provider environments.
Post Reply