-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Still seeing sporatic LFTP timeouts that seem to lock up the thread #119
Comments
I'm having these issues. It takes like 4-5 attempts to start a download and half of the time I need to restart the service. |
I happened across an article that referred to LFTP default settings. In there are timeouts and retries settings. It would be great to have access to those settings. I tried editing the etc/lftp.conf file but there is no nano or vim installed and I am unable to install those on the Docker container. I also am unable to so anything sudo as sudo does not exist. There was an article that apparently explained how to add sudo to a docker container but my brain broke trying to figure it out. But, adding vars to account for the LFTP settings or, exposing the conf file in the containers persistent settings would be an awesome addition to help tweak LFTP. https://askubuntu.com/questions/1012006/lftp-default-timeout-and-retry |
Here is the complete list of default LFTP settings in the system lftp :~> set -d |
Some things that stuck out to me set net:idle 3m - This will time out a connection with no traffic after 3 minutes. That might be a bit long. set net:max-retries 1000 - This will cap how many times it will retry a transfer. While 1000 seems like it would be sufficient, I wonder if this limit gets hit and if the LFTP service is still running, that count might be getting stuck. That's why a restart of the service seems to open things back up again. set net:reconnect-interval-base 30 These values are in seconds (aside from the multiplier). The service will wait to reconnect after 30 seconds. After each subsequent failure to connect it will apply the multiplier to the current interval value, assign the result to the current reconnect time period and try again. If it fails again, the multiplier is used to calculate the next new reconnect time period. Up to the maximum reconnect time period which is set to 600 seconds. This to me seems a bit too long across the board. For a server to take 30 seconds to respond means there are other problems. Connections should be measured in milliseconds, not seconds. set net:timeout 5m Sets the network protocol timeout, in this case SFTP. 5 minutes is an eternity for a server to wait for a command, especially so for an automated system like Seedsync. This should be much much shorter. The thought I had with most of these settings is if these statistics are persisted when the service is started up. If that's the case, then hitting the max on timeouts and retries would mean the server never recovers lost threads and dropped connections. Perhaps the Seedsync UI, the scanner and LFTP need to be separate services. When the scanner detects changes on the server it starts up LFTP and starts transfers. Each queued item in the list, once completed, would shut down and restart the LFTP service for the next queued item so that the stats are cleared each time a new download starts. I know that this would kill simultaneous file downloads, but, each file downloaded would get all of the threads meaning each file would download faster. We are, after all, limited to the bandwidth our ISPs provide us. Whether you are downloading 1 file or 5 files at once, the bandwidth is spread across all downloads. Why not just get each individual file faster? That is actually how my config is set up. I always had corruption issues when I had it set to download multiple files at once. Just a thought (and a hope). |
I am seeing LFTP timeouts that seem to lock the thread so that it cannot be used again unless the service is restarted.
After a while, I have noticed that the DL speeds would cap out at a very low level.
The speeds would not resume to normal until after I restart the service.
Nothing jumps out in the logs -aside from the timeout that is.
2022/03/29 10:49:28 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:49:32 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:50:10 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:50:14 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:50:17 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:50:56 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:50:59 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' '
before (last 100 chars): b' '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
2022/03/29 10:51:03 - ERROR - seedsync.Controller.Lftp - Lftp timeout exception
Traceback (most recent call last):
File "lftp/lftp.py", line 128, in __run_command
File "pexpect/spawnbase.py", line 343, in expect
File "pexpect/spawnbase.py", line 372, in expect_list
File "pexpect/expect.py", line 181, in expect_loop
File "pexpect/expect.py", line 144, in timeout
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f6f01dfd4c0>
command: /usr/bin/lftp
args: ['/usr/bin/lftp', '-p', '22', '-u', 'XXXXXXXXX,XXXXXXXXXXXXXX', 'sftp://XXXX.XXXXXXXX.XX']
buffer (last 100 chars): b' jobs -v\r\n'
before (last 100 chars): b' jobs -v\r\n'
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 21081
child_fd: 28
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'lftp [email protected]:.>')
The text was updated successfully, but these errors were encountered: