Re: [Proftpd-user] Problem with a lot of connections
Dieter Bloms via Proftp-user <[email protected]>
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Mon, Nov 30, Göran Hasse wrote: > I have a server, Ubuntu, (5.4.0-53-generic) with ProFTP (ProFTPD 1.3.6c). > > On this we have a LOT of IoT devices logging in at the SAME account. There is > about > 100 of those devices connecting at exactly(!) the same time. They run > on a GPS clock and the connections is within ms. > > Very often they can connect, login, create the file to be transfered, > and then deliver data but sometimes they can't deliver data. > > One potential problem is that our net operator is NAT:ing all our devices > and they get the same IP-nummber. And this could be a resource problem > in their NAT software. One other potential problem is ProFTPD cand handle > this many passive FTP connections. > > <pre> > 2020-11-28 07:10:15,890 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): Data transfer stall timeout: 600 seconds > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): Transfer aborted after 0 bytes in 583.64 seconds > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): notice: user ftp-incomming: aborting transfer: Data connection closed > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): dispatching POST_CMD_ERR command 'STOR data.json' to mod_exec > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): dispatching POST_CMD_ERR command 'STOR data.json' to mod_quotatab > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): dispatching LOG_CMD_ERR command 'STOR data.json' to mod_log > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): dispatching LOG_CMD_ERR command 'STOR data.json' to mod_xfer > 2020-11-28 07:10:15,891 ajabsab proftpd[890999] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > 2020-11-28 07:10:20,904 ajabsab proftpd[890755] ajabsab (193.181.246.218[193.181.246.218]): FTP no transfer timeout, disconnected > 2020-11-28 07:10:20,905 ajabsab proftpd[890755] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > 2020-11-28 07:10:21,489 ajabsab proftpd[890795] ajabsab (193.181.246.218[193.181.246.218]): FTP no transfer timeout, disconnected > 2020-11-28 07:10:21,490 ajabsab proftpd[890795] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > 2020-11-28 07:12:23,997 ajabsab proftpd[890817] ajabsab (193.181.246.218[193.181.246.218]): FTP no transfer timeout, disconnected > 2020-11-28 07:12:23,998 ajabsab proftpd[890836] ajabsab (193.181.246.218[193.181.246.218]): FTP no transfer timeout, disconnected > 2020-11-28 07:12:23,998 ajabsab proftpd[890817] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > 2020-11-28 07:12:23,999 ajabsab proftpd[890836] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > 2020-11-28 07:16:17,789 ajabsab proftpd[891183] ajabsab (193.181.246.218[193.181.246.218]): FTP no transfer timeout, disconnected > 2020-11-28 07:16:17,790 ajabsab proftpd[891183] ajabsab (193.181.246.218[193.181.246.218]): FTP session closed. > </pre> maybe you can insert a random sleep before the ftp command is executed. in Perl I did it this way: --snip-- use Time::HiRes qw( usleep ); my $maxtimewait = 10000000; # random micro seconds we will wait before sending data .... # we will wait some random time, so not all servers will send data at the very same time my $waittime = int ( rand ( $maxtimewait ) ); print_debug ( "will wait for $waittime microseconds" ); usleep ( $waittime ); I think you can insert random waits in every language .... -- Gruß Dieter -- I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the From field. _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html