From: "S. Robert James" Date: 2007-01-24T06:20:07+09:00 Subject: Re: Does Ruby's FTP lib have a ghostly bug? I just added FTP conneciton caching, which seems to have removed the problem. Therefore, I'll assume that this was *not* a ftp.rb problem, but rather connections being refused when too many came in. (This didn't show up on simple command line testing, because the rate was much slower.) I'll add that being that the EOFError message is quite cryptic, perhaps whoever maintains ftp.rb could make a more comprehnsible error message (along with the actual OS level socket error). I also need to thank Ara. By asking me what I thought was an obvious question (does command line ftp work), he forced me to communicate my assumption ("command line works, cryptic error message --> ergo ftp.rb problem") and consequently rethink it. Is the command line doing the same thing as the app? No, it's making a lot fewer connections. This has served to me as a good lesson in debugging: 1. Can you prove the problem is where you think it is? Expand the scope. 2. With any bug, there's something that you're wrong about. Perhaps those things which give you the information you are sure of are themselves wrong. That is, don't just look for problems where you see them -- look for problems in all of your proofs to get there. 3. Last, always tell the problem to someone else. Having to communicate to someone forces you to rethink it. And if that someone else wants proof (like most good Rubyists), it forces you to prove it. In this case, when I glanced at the src code, I thought it _did_ cache the connections. But I was going to paste that line in to the list and saw that, in this scenario, it wasn't caching them. Thanks Ara! And thanks comp.lang.ruby!