This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248481 - Really slow ftp upload
Summary: Really slow ftp upload
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 8.0.1
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-07 09:28 UTC by knives214
Modified: 2015-05-14 09:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
FaqLogMessagesFile (33.95 KB, text/x-log)
2014-11-07 09:28 UTC, knives214
Details
profiler snapshot (57.48 KB, application/octet-stream)
2014-11-11 09:12 UTC, knives214
Details
new message log (34.24 KB, text/x-log)
2014-11-11 09:13 UTC, knives214
Details

Note You need to log in before you can comment on or make changes to this bug.
Description knives214 2014-11-07 09:28:38 UTC
Created attachment 150336 [details]
FaqLogMessagesFile

Hi all!

we encountered a really big problem with ftp upload:

220 (vsFTPd 3.0.2)
USER #####
331 Please specify the password.
PASS ******
230 Login successful.
TYPE I
200 Switching to Binary mode.
CWD /
250 Directory successfully changed.
PWD
257 "/"
CWD /dist/classes/Template
250 Directory successfully changed.
PASV
227 Entering Passive Mode.
STOR UserProfileTemplate.class.php.new
150 Ok to send data.
226 Transfer complete.
RNFR UserProfileTemplate.class.php.new
350 Ready for RNTO.
RNTO UserProfileTemplate.class.php
250 Rename successful.
QUIT
221 Goodbye.

Summary
====================
Succeeded:
file      dist/classes/Template/UserProfileTemplate.class.php
Runtime: 37 s, processed: 1 file(s), 44,423 KB

as you can see, it takes 37secs to upload only 44KB! Obviously this is just an example, sometimes it takes less time, sometimes more, sometimes with bigger files the upload is stopped after 50-60secs saying that is all ok, but the uploaded file is incomplete.
We don't have proxies and the same upload (same file and same configuration) with filezilla takes only 2-3 secs, so I guess this isn't a connection issue.
we usually upload single file, after some modification, but the problem also occurs uploading multiple files. 
We also tried to upload enabling "upload files directly" but nothing had changed. 90% of the time is taken after the printing of "150 Ok to send data."
Do you have any suggestions?

thank you in advance,
Roberto!
Comment 1 Tomas Mysik 2014-11-07 09:57:20 UTC
There is no error in the attached IDE log. Is it slow for all your PHP projects? All your remote servers? Is it slow only for upload or for download as well? Are you sure that this is not a problem of your internet connection? Can you try using Oracle JDK 8?

BTW NetBeans uses Apache Commons Net library for FTP download/upload so such a problem should have then a plenty of people all around the world I guess (I found e.g. [1] but no answer).

Please, create a profiler snapshot [2] and attach it here. Start profiling just before upload and stop it right the upload finishes.

Simply reopen this issue, thanks.
[1] http://stackoverflow.com/questions/17221714/apache-commons-net-slow-ftp-upload
[2] http://wiki.netbeans.org/FaqProfileMeNow
Comment 2 Tomas Mysik 2014-11-07 09:59:14 UTC
One more idea - could you please try another _Java_ FTP client? It could be also Java issue...

Thanks.
Comment 3 knives214 2014-11-11 09:12:35 UTC
Created attachment 150418 [details]
profiler snapshot
Comment 4 knives214 2014-11-11 09:12:58 UTC
Hi, sorry it took me really long to answer...
by the way, the ftp is slow for all our project, but only uploading, download is normal. I've installed jdk 8 and nothing changed (I've also modified netbeans.conf in order to start with the right java version) and, moreover, I'm sure that this isn't a connection problem: I've tried with filezilla, eclipse and with jftp and the upload is normal, so I guess that the problem is not realated to java or to the connection, it only appens with netbeans.


I've attached the profiler snapshot, hoping that it will help :)
Thank you,
Roberto
Comment 5 knives214 2014-11-11 09:13:47 UTC
Created attachment 150419 [details]
new message log
Comment 6 Tomas Mysik 2014-11-11 09:35:54 UTC
Thanks a lot, I will look at it.
Comment 7 knives214 2014-11-20 10:42:35 UTC
Hi! Any news? :)
Comment 8 Tomas Mysik 2014-11-20 12:31:16 UTC
Not yet, sorry. Currently, we are feature phase; bugfixing phase will come later. Perhaps you can ty some old(er) NetBeans just to verify that the problem was always there.

Thanks.
Comment 9 knives214 2014-11-20 13:23:43 UTC
ok! I'll try, thanks :)
Comment 10 Tomas Mysik 2015-05-13 09:01:37 UTC
One more question - does it happen with all FTP servers? Ot is it slow just for one specific server?

Thanks.
Comment 11 Tomas Mysik 2015-05-13 09:19:21 UTC
From profiler snapshot, the time is spent in

java.io.FileInputStream.read0[native]()	85.1067	20 008 ms (85,1%)	20 008 ms

which means that reading of the file takes all this time. Is the file on your local disc? Or is it some network share? I will investigate more...

Thanks.
Comment 12 Tomas Mysik 2015-05-13 09:20:16 UTC
(In reply to Tomas Mysik from comment #10)
> One more question - does it happen with all FTP servers? Ot is it slow just
> for one specific server?

This is irrelevant now, the reading of the file is slow, not uploading itself.

Thanks.
Comment 13 Tomas Mysik 2015-05-13 09:29:46 UTC
I guess I found it. Should be fixed now, please verify. Thanks a lot and sorry for inconveniences!

http://hg.netbeans.org/web-main/rev/f6b9bf1ba66e
Comment 14 Tomas Mysik 2015-05-13 09:31:30 UTC
@vriha: Láďo, if you want to verify it, try to upload files from some network share/drive (local files should always be fast).

Thanks.
Comment 15 knives214 2015-05-13 12:53:59 UTC
Hi! I can confirm that the file are from a NAS (d-link share center) and that uploading local file goes normal.
I've tried the lastest nightly, but nothing changed, is it normal?

Thank you really much and have a nice day!
Comment 16 Quality Engineering 2015-05-14 03:08:23 UTC
Integrated into 'main-silver', will be available in build *201505140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f6b9bf1ba66e
User: Tomas Mysik <tmysik@netbeans.org>
Log: #248481 - Really slow ftp upload
Comment 17 Tomas Mysik 2015-05-14 05:40:26 UTC
(In reply to knives214 from comment #15)
> Hi! I can confirm that the file are from a NAS (d-link share center) and
> that uploading local file goes normal.

So my suspicion was right, that is fine! :)

> I've tried the lastest nightly, but nothing changed, is it normal?

Try a newer one, see the previous comment about integration. Or try directly our dev build [1], use the ZIP file.

In any case, please let us know if it helps or not.

Thanks!
[1] http://deadlock.netbeans.org/job/web-main/
Comment 18 Tomas Mysik 2015-05-14 05:41:10 UTC
BTW if it does not help, please create a new profiler snapshot.

Thanks!
Comment 19 knives214 2015-05-14 09:46:13 UTC
I've tested the latest build and it work fine! thank you very much for your help :)
Comment 20 Tomas Mysik 2015-05-14 09:58:55 UTC
Thanks a lot for your verification!