Friday, August 23, 2013

HTTP Error: 502 (Bad Gateway)

I started having some Internet connectivity issues this week. The symptoms varied from sluggishness to seemingly random errors. The most frustrating error was an HTTP Error: 502 (Bad Gateway) error that occurred when trying to use TortoiseHg to push changesets to a remote repository. I have been pushing changesets with TortoiseHg for years ... and just started getting this error this week.

I googled the error message and found all sorts of advice. I spent hours trying to figure out what was causing the 502 error during the Hg push. I upgraded Hg on my machine and the remote server. I switch hgweb from CGI to ISAPI. None of these things made any difference.

I finally got smart enough to pray for help. Moments after praying, I had the thought that I should unplug my machine from my router and plug it directly into my cable modem. At first I thought that sounded silly, so I kept searching online. The thought kept coming back to me, so I decided to try it. Sure enough, as soon as I bypassed my router, the error went away. I was able to push my changesets without any trouble whatsoever.

I did some additional testing and found that my speed was much faster without the router as well. Other random errors seemed to go away. I have learned two things from this experience:

(1) God knows what He is doing. He is willing to help, if we are only willing to ask. I should have asked a lot sooner.

(2) My Dell TrueMobile 2300 Wireless Broadband Router has some issues with Parental Control rules. I had setup some rules earlier this week to limit the time of day that our kids could be online. Even though the control rules were for entirely different IP addresses than my main machine, they were affecting all Internet traffic going through the browser. After removing the rules, everything was back to normal (no more 502 Bad Gateway error in Hg, no more random errors, twice as fast).

No comments:

Post a Comment