Extremely slow ftp upload

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
500 Command not understood
Posts: 3
Joined: 2013-01-02 14:53
First name: h
Last name: s

Extremely slow ftp upload

#1 Post by mlt1234 » 2013-03-11 10:23

I am suddenly experiencing extremely slow upload times using the below ftp client written en java:

Code: Select all

    SSLContext sslContext = createSSLContext();
    ftpsClient = new FTPSClient(sslContext);

    ftpsClient.connect(host, PORT);
    int reply = ftpsClient.getReplyCode();
    if (FTPReply.isPositiveCompletion(reply)) {
      // Login
      boolean login = ftpsClient.login(user, password);
      if (login) {
        // Set protection buffer size
        // ftpsClient.execPBSZ(0);
        // Set data channel protection to private
        // Enter local passive mode
      } else {
        log.error("FTP login failed");
    } else {
      log.error("FTP connect to host failed");

    BufferedInputStream bis = new BufferedInputStream(new FileInputStream(src));
    boolean storeFile = ftpsClient.storeFile(dest, bis);
It takes around 10 hours to upload two files approx. 100 mb each. Any ideas what might be causing this?

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

Re: Extremely slow ftp upload

#2 Post by botg » 2013-03-11 22:30

Logs from the server and ideally the client as well would be nice.

500 Command not understood
Posts: 1
Joined: 2013-04-01 09:31

Re: Extremely slow ftp upload

#3 Post by chrisco » 2013-04-01 09:33

I was having a similar problem when using Java 7 on both linux and windows. Not sure what causes it but I know what fixes it! :)

You need to set buffer size to 0 and then FTPClient works at normal speed:


I found this trick on a stack overflow page.


That fix was a workaround. Apache have actually fixed the problem properly in the Commons Net 3.3 snapshot.

500 Command not understood
Posts: 1
Joined: 2013-04-04 17:25
First name: David
Last name: Youngblood

Re: Extremely slow ftp upload

#4 Post by VirtualTourGuy » 2013-04-04 17:28

How do I find the place on either my computer or in an application which allows me to edit ftpClient.setBufferSize(0).

I have searched my computer and tried running that request from the command prompt, however, I dont seem to be able to find it.

Thank You

User avatar
Posts: 25257
Joined: 2006-05-01 03:28
Location: Germany

Re: Extremely slow ftp upload

#5 Post by boco » 2013-04-04 18:29

You cannot, that thread is about a self-coded Java client. As you have a different problem please open your own topic. Thanks.
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

500 Command not understood
Posts: 1
Joined: 2013-04-08 21:15

Re: Extremely slow ftp upload

#6 Post by technodealio1 » 2013-04-08 21:21

This is why I use a host for all this stuff. Not because personal FTP is insufficient, but because I'm too lazy to figure these sort of things out. I use hostgator for my deal website and they have been great. Very good 24/7 tech support too.
Last edited by boco on 2013-04-09 01:22, edited 1 time in total.
Reason: No URLs allowed.

Post Reply