Tons of connections from "System Process", Error 421

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Tons of connections from "System Process", Error 421

#1 Post by jumpfroggy » 2008-03-19 20:10

I've searched but haven't found a match for my problem yet. I'm connecting to a server that allows 8 simultaneous connections. I set the max transfer to 4 and max connections to 8. I figure that the server only allows 8 connections, and each transfer needs two connections (one for control, one for data). Is my reasoning right here?

The bigger problem is that it works fine for a while, but eventually it stops working and just sits there getting "421 Too many connections (8) from this IP". I opened TCPview to see how many connections there really were, and it seems like the filezilla process only has 3 connections open on port 21. However, the "System Process" has tons of connections open on port 21, with more being opened all the time. I've attached a screenshot of what this looks like.

Image

When I first start transferring files, I can see that Filezilla has 4 port 21 connections open and keeps opening/closing the data connections on random ports (max 4 at a time). However, eventually the "System Process" starts opening up port 21 connections, very slowly. Once they open, they stay for a long while (5-10 minutes?) then eventually time out and close. Is filezilla causing these System Process FTP connections? What else could be causing them? I've killed all other processes except system process/services, and nothing obvious remains to cause these.

Update... I was just monitoring the file transfer behavior, and noticed something. If I limit the connections to 8 and the transfers to 4, it works for a while. If I up the transfers to 5, eventually it gets a "Too many connections", and that's when the System Process connection shows up. Every time filezilla tries to reconnect and fails, a System Process connection is made. Any ideas why this is happening?

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Tons of connections from "System Process", Error 421

#2 Post by botg » 2008-03-19 21:34

Uninstall all firewalls and virus scanners and try again.

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Tons of connections from "System Process", Error 421

#3 Post by jumpfroggy » 2008-03-19 21:35

botg wrote:Uninstall all firewalls and virus scanners and try again.
No firewalls or anti-virus were installed, windows xp firewall is disabled for all interfaces.

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Tons of connections from "System Process", Error 421

#4 Post by boco » 2008-03-19 22:34

This is weird. Using Active or Passive mode?

Sockets in Windows are put on hold by the system (around 4 minutes) before they can be reused. But even that doesn't explain the tons of open connections. Somewthing on your system seems to prevent them from closing gracefully, so they stay in limbo until they timeout.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Tons of connections from "System Process", Error 421

#5 Post by jumpfroggy » 2008-03-19 23:56

boco wrote:This is weird. Using Active or Passive mode?
Sockets in Windows are put on hold by the system (around 4 minutes) before they can be reused. But even that doesn't explain the tons of open connections. Somewthing on your system seems to prevent them from closing gracefully, so they stay in limbo until they timeout.
PASV mode. Yeah, seems pretty strange to me. It's only with Filezilla, not with Firefox or other programs. It only happens when Filezilla tries to connect and can't due to too many connections; I see the red error message in the FTP log, and immediately following I see a new System Process connection show up. They take quite a while to time out, so they just accumulate. I have not yet seen any Sys Process connections show up without that error message, nor have I seen the error pop up without the SyS Process connections showing up.

It could be related to something else (some obscure other program interfering, firewall/router with faulty FTP rules that disallow the final closing packet, etc). But so far it's something I've only seen with Filezilla. I should try another multi-transfer FTP client...

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Tons of connections from "System Process", Error 421

#6 Post by boco » 2008-03-20 01:04

Yeah, somehow the handshake with the server is interrupted in the 421 case. Maybe some 'security' software blocking ACK or NACK packets, could be at the server side, too. Connections stay 'half-open'. The problem is you would eventually use up your local sockets, beeing unable to connect until some time out..
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Tons of connections from "System Process", Error 421

#7 Post by jumpfroggy » 2008-03-20 01:18

I found these, which were very informative:
http://www.port80software.com/200ok/arc ... 7/205.aspx
http://www.port80software.com/200ok/arc ... 3/212.aspx
The first shows what TIME_WAIT means, and the second explains why a web server accumulates many of these. Basically, after connection close the computer that initiated the close waits a certain amount of time (240 seconds or 4 minutes, as stated above) then frees the connection. During this time, the other computer is already disconnected.

So in my case, all those TIME_WAIT connections on my client should be disconnected from the server and waiting 240 seconds before closing. However, this would not explain why the FTP server eventually complains "Too many connections (8) for this IP" when I have no transfers active, and only 1 or 2 connections from Filezilla to the server.

FTP Client FTP Server

(Initiate close)
Send FIN
FIN_WAIT_1
-------------- FIN -------------->
Receive FIN
Send ACK
CLOSE_WAIT
(waiting for application to close)
<------------- ACK ---------------
Receive ACK
FIN_WAIT_2
Application has closed, send FIN
Connection is closed.
<------------- FIN ---------------
Receive FIN
Send ACK
TIME_WAIT
-------------- ACK ------------->

(I've switched the client and server from the original, since the TIME_WAIT's are on the client in my case).

So in that diagram, consider that the FTP client initiates a close by sending FIN. We go through the process till the FTP Server sends its FIN, at which point the FTP Client enters TIME_WAIT. At this point, if the router were stupid enough to prevent the last ACK from taking place, maybe the connections would end up TIME_WAIT on the client side, but the server would be stuck waiting for the last ACK to come through before releasing the connection.

This would only happen when the FTP client initiates the close, which (might be) what's happening when Filezilla tries to connect and gets a "421: Too many connections from this IP" error. Filezilla initiates close, the router screws it up, and we have an extra connection sitting around on the server side waiting to time out.

This would not happen during normal file transfer, since (if I remember correctly) the FTP server closes a data connection to signify the end of the data stream. If the router did not screw this one up, then the server would have a TIME_WAIT connection, but it would have been properly closed on the client side (and therefore no problems).

That's a crazy but seemingly plausible solution. I'm using a Buffalo G125 router with DD-WRT v24 Beta (08/15/07) std.

Here's another screenshot:
Image

Shows about 4-5 minutes after transfers stopped. I purposefully set the simultaneous transfers high, to simulate the too many connections. However, then I stopped everything, waited a while, and then tried to transfer files again. It's been 10 minutes, still can't transfer anything. Right now Filezilla is closed, no connections at all. I open filezilla, it connects and lists the directory fine. I go to transfer, and get the "Too many connections" error and some more TIME_WAIT system process connections. This is pretty crazy, can't figure out what's causing it.

I did have one idea though... when I set "Max transfers" to 4, that doesn't include the data connection for the directory listing, does it? My server only allows 8 connections (including control & data connections, not sure if that's true), so I set max connections to 8. Then I set max transfers to 4. I go to transfer a folder, and filezilla starts listing folders recursively while transferring files. However, it's doing 4 transfers while listing a folder; 1 control & data to list folders, 4 control & data to transfer 4 files... 10 connections total? Does filezilla ignore the first control & data connection pair when enforcing the connection limit?

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Tons of connections from "System Process", Error 421

#8 Post by jumpfroggy » 2008-03-20 01:25

boco wrote:Yeah, somehow the handshake with the server is interrupted in the 421 case. Maybe some 'security' software blocking ACK or NACK packets, could be at the server side, too. Connections stay 'half-open'. The problem is you would eventually use up your local sockets, beeing unable to connect until some time out..
Yeah, I figured something like this in my previous post. No security software installed, XP Firewall turned off, no anti virus. I'm not having trouble running out of local connections... I'm running out of remote connections (ie. active connections on the server), so the server doesn't see those connections as "closed", and is limiting me even when I have no active connections at all.

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Tons of connections from "System Process", Error 421

#9 Post by botg » 2008-03-20 08:37

During transfers and listings, 1 FTP Connection = 1 control connection + 1 data connection = 2 TCP connections.

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Tons of connections from "System Process", Error 421

#10 Post by boco » 2008-03-20 15:30

jumpfroggy wrote:
boco wrote:Yeah, somehow the handshake with the server is interrupted in the 421 case. Maybe some 'security' software blocking ACK or NACK packets, could be at the server side, too. Connections stay 'half-open'. The problem is you would eventually use up your local sockets, beeing unable to connect until some time out..
Yeah, I figured something like this in my previous post. No security software installed, XP Firewall turned off, no anti virus. I'm not having trouble running out of local connections... I'm running out of remote connections (ie. active connections on the server), so the server doesn't see those connections as "closed", and is limiting me even when I have no active connections at all.
Then it seems to be at the server side or at the ISP level.

@botg: But one control connection can initiate many data connections, right? If I have 4 transfers going on, I have only 5 connections open (1control, 4data) and not 8.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Tons of connections from "System Process", Error 421

#11 Post by botg » 2008-03-20 16:28

No, for every data connection there is a control connection. 4 transfers = 8 tcp connections.

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Tons of connections from "System Process", Error 421

#12 Post by boco » 2008-03-20 16:52

Woa it seems I misunderstood you. You're talkin' 'bout TCP connections. Must be getting old...
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Tons of connections from "System Process", Error 421

#13 Post by botg » 2008-03-20 20:40

boco wrote:Must be getting old...
Just a fluke in your genetic makeup :P

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Tons of connections from "System Process", Error 421

#14 Post by jumpfroggy » 2008-03-21 19:36

botg wrote:During transfers and listings, 1 FTP Connection = 1 control connection + 1 data connection = 2 TCP connections.
It's a bit ambiguous, but I wonder which "connection" is used where. In Filezilla, under the site manager, is "Limit number of simultaneous connections" referring to FTP Connections (ie. TCP Connection Pairs)?

Also, I wonder if the FTP server error (Too many connections (8) for this IP) is referring to TCP or FTP connections. Anyone know?

I'm also on a newer FTP server that allows 2 connections per user. It seems this means TCP connections, since it doesn't seem to allow me transfer more than one file at a time. I can connect and transfer files, but if I open 2 filezillas with both connected, neither can transfer files. The only exception is directory listings! Technically, each directory listing uses its own data connection, just like a file transfer, but for some reason FTP servers seem to ignore this when counting the number of open/active connections. Weird.

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Tons of connections from "System Process", Error 421

#15 Post by botg » 2008-03-21 19:44

jumpfroggy wrote:In Filezilla, under the site manager, is "Limit number of simultaneous connections" referring to FTP Connections (ie. TCP Connection Pairs)?

FTP connections which are at most 2 TCP connections.
Also, I wonder if the FTP server error (Too many connections (8) for this IP) is referring to TCP or FTP connections. Anyone know?
Usually FTP connections, but can't be sure about all servers.
I'm also on a newer FTP server that allows 2 connections per user. It seems this means TCP connections, since it doesn't seem to allow me transfer more than one file at a time.
In FileZilla terms there are two types of FTP connections: Browsing connections and transfer connections. In order to allow the user to browse the server during a transfer, the browsing connection does not get used for transfers. (Exception: Connection limit set to 1).
So 2 transfers + browsing connection = 3 FTP connections = up to 6 TCP connections.

Post Reply