rails app throwing (NSURLErrorDomain:-1005) error?

Hopefully this helps some of my rails friends, because this problem was frustrating as heck.

After adding a bunch of new stuff to our rails app, including new handling for file uploads, I updated the remote server. While putting together an update email, I ran through the new processes, and started getting this NSURLErrorDomain: -1005 from Safari. Tried it in Firefox, and got a connection reset error. I tried it from another computer in the house, and got the same error. I tried the same process on my local dev servers, and didn’t get the error. Strange, right? So, I called my brother and had him try it from his computers, and it worked fine!

At this point, I was sure the problem was in my own network, somehow.

Finally, I emailed my boss and asked if he had heard of this happening before. We ran through some more tests and were even more convinced that somehow, my network was causing the problem. After a few more minutes, though, it came to him: apache had some stale fcgi processes, and for some reason, my network kept hitting the same stale dispatcher, which caused the immediate reset of the connection. He stopped apache, killed all fcgi’s, and restarted it. Problem solved.

2 Responses to “rails app throwing (NSURLErrorDomain:-1005) error?”

  1. Keegan Meuer
    October 19th, 2006 19:42
    1

    How do i stop apache, and kill all fcgi’s? will this have any effect on my computer? what does apache do? i have a macbook that runs a the new tiger version of mac OSX version 10. 4. 6.

  2. bryan
    October 19th, 2006 21:15
    2

    Hi Keegan,

    I had written a script that grabs the PID numbers of all of the fcgi processes, then it killed them. The problem is that Apache probably will need to be bounced as well. We switched to mongrel and haven’t had any problems, so I suggest at least looking at it, unless you have a reason that forces you to stay with fcgi. With Mongrel you can still use Apache the same way, plus you gain load balancing and some other cool things.

Leave a Reply