Bug 83270

Summary: open multiple files via sftp downloads the files simultaneously, not in sequenze
Product: [Applications] kate Reporter: Helge Hielscher <hhielscher>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: ahartmetz, jsardid, maarten.sneep, matt, mrgrim, self
Priority: NOR    
Version: 2.2.1   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 122036    
Attachments: New crash information added by DrKonqi

Description Helge Hielscher 2004-06-12 18:26:51 UTC
Version:           2.2.1 (using KDE KDE 3.2.2)
Installed from:    Mandrake RPMs

steps to reproduce:
1. open file
2. point the dialog to an sftp:// host
3. mark 20 files
4. press OK

result: Kate tries to download all 20 files at the same time, thus many downloads fail because the sftp server does not allow that many connections

expected result: Kate downloads all files using one sftp connection
Comment 1 Christoph Cullmann 2005-01-13 22:37:29 UTC
this is more a wish, it might result in a bug for your setup, but is generally not a unwanted feature, to load multiple files at once can have speed benefits, and is common kde practice
Comment 2 Niklas Laxström 2006-01-05 21:33:03 UTC
This happens also when resuming a session with many files opened using sftp.
Comment 3 Anders Lund 2006-01-06 17:19:17 UTC
This is a problem in the kio framework, and there is light at the end of the 
tunnel - related issues are being discussed at the kde-devel mailing list.
Comment 4 Michael Kreitzer 2008-11-07 15:52:31 UTC
I know this bug is quite old, but it's the only one I can find regarding this issue. This behavior is highly undesirable for remote connections where you have 20, 30, or even 50 files in a session. Most servers frown on a sudden influx of 50 connections within a second or two, and you'll either get blocked by the firewall or the majority of files will not load as the connections are refused beyond a certain threshold.
Comment 5 Maarten Sneep 2009-01-19 14:15:24 UTC
I run into this issue with Kate. Please provide an option to limit the number of simultaneous connection to a user selectable maximum. At the very least indicate in the sidebar which documents failed, and offer to reload from the contextual menu.

This is not a wishlist item, it is a blocking BUG.

Right now I use a script to load the files I need in sequence. I hope this workaround will help others.

#!/bin/bash
filelist="list of sftp urls"
session="Session $$"
kate --use --start $session

for file in filelist
do
    kate --start $session --use "$file" &
    # give Kate some time to open the remote file to avoid swamping the server.
    sleep 1
done
Comment 6 Maarten Sneep 2009-01-19 14:17:44 UTC
*** This bug has been confirmed by popular vote. ***
Comment 7 Matt Williams 2009-03-05 13:36:07 UTC
I can confirm this behaviour with latest trunk. As previously stated, it is likely due to opening so many sftp connections and so it causes bug #122036 to occur.

I think this should be reclassified as a BUG and not as a feature request since having more that 10 or so files in a session causes most of the files not to open and means that I have to click 'Ok' on the SFTP connection dialog for every single file.
Comment 8 Andreas Hartmetz 2010-02-23 01:44:40 UTC
*** Bug 122036 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Hartmetz 2010-02-23 01:46:54 UTC
Fixed due to new KIO scheduler in trunk.
Comment 10 avlas 2010-04-19 17:04:09 UTC
Created attachment 42898 [details]
New crash information added by DrKonqi

I found that this is indeed fixed when I open multiple text files at once from dolphin through a sftp connection, however if I drag and drop those files directly from dolphin to kate the issue persists. Exatly the same happens if, alternatively, I open those files directly from the kate open menu.