Lately I've been having a very strange problem with my Rails app running on TextDrive. Part of its job is to send files to a remote server, using net/ftp. This has always worked fine, but in the last week or two, I've had huge problems sending them to servers at A Small Orange (another hosting company). Not all the time, but some of the time. Weird. What happens is that the first file to be transferred just hangs. Usually, the whole batch goes over, no problem. But lately, some sites will start the transfer of the first file, and hang. It creates a file on the destination server, but it's a zero byte file. I make a connection and login: @connection = Net::FTP.new @website.site_ftp @connection.login( @website.username, @website.password ) I then change to the right folder and send the file: chdir remote_path @connection.putbinaryfile local, remote_file And the error is raised on that last line - just a TransferError from the net/ftp library, and a zero-byte file after hanging for about 30 seconds. Can anyone offer any suggestion at all? Bear in mind this has worked fine with a great number of hosts, even this problematic host until about a week ago. I've contacted the admin of ASO and he suggested that I might want to try "changing between the PASV and PORT connection methods" but I'm not sure how to do this with net/ftp, or if it will break my other sites using this app. What should I try next?
on 2006-05-04 00:13