Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.8k views
in Java FTP by (162k points)
A user writes:

Hi,

I am having problem using your ftp library. When I am calling getFile(), my application sometimes would just hang there to wait for response. Do you know if anyone else is experiencing the same problem?

Thanks,

Michael


You'll need to post a log file. Where is getFile()?

4 Answers

0 votes
by (220 points)
227 Entering Passive Mode (64,94,24,132,219,110)
---> RETR 21.in
150 Data connection accepted from 216.27.189.18:3549; transfer starting for 21.in (2072333 bytes).

It looks like the ftp server is really busy, but I was not able to get any timeout and stuck there forever - even tho I had set a value in the timeout.

I was using get(String, String) method and not the getFile(). Sorry about the confusion. One more thing is that I am not sure if this is related to the library or server. There are at least 5 seconds minimun overhead to download any files even the files are just 1kb. I have checked the code and that 5 seconds came from the creation of socket instance "new Socket(url, port)". Do you know any way to improve it?

THanks,

Michael
0 votes
by (162k points)
It could be resolving the hostname. Try supplying an InetAddress.

One more thing is that I am not sure if this is related to the library or server. There are at least 5 seconds minimun overhead to download any files even the files are just 1kb. I have checked the code and that 5 seconds came from the creation of socket instance "new Socket(url, port)". Do you know any way to improve it?

THanks,

Michael
0 votes
by (220 points)
Actually resolving the hostname took less than 100ms. I found that the 5 seconds were taken when creating a new socket everytime you do a passive mode. I wonder if anyone else have the similar problem.
0 votes
by (220 points)
Looks like the problems is not related to the library but to the ftp server.

Thanks

Categories

...