TechSpot

Bad gateway?

  1. I'm getting "502 Bad Gateway" messages on certain threads. Even a post which I was successful in placing, led to this error.

    So, is this my browser, or the website?
  2. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    Sounds like a server error, but it's strange considering the loads are very low.
  3. mailpup

    mailpup TS Special Forces Posts: 8,426   +217

    For what it's worth, I look at a ton of threads but I don't recall getting this error recently. That's just my personal experience. If others have gotten it, perhaps they'll post here.
  4. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    Or... it could have been our developers uploading something (due to the spammers issue we are having) just when capt. was browsing around.
  5. Leeky

    Leeky TS Evangelist Posts: 4,378   +98

    I've been getting them as well. Every one of the three pictures I recently uploaded failed with the same error, but when I went back to My Pictures they were there fine.

    I just assumed it was a glitch as nobody else had said anything. I've even had it on a couple of post edits as well, but again everything was fine, it just came up with the "502 Bad Gateway" page for some reason.
  6. jobeard

    jobeard TS Ambassador Posts: 13,403   +314

    Yes, ALL 5xx error codes are from the server side - - and not easy to debug.

    However, don't forget that the code creating that message can have more than one path
    to it AND the text is seldomly precise. It is very possible that any TCP error attempting to write the response could be mapped to this err+txt message, including problems with the ISP to which the server is attached.

    the server error.log should have some clues (but may also need to have DEBUG enabled to be of much value)
  7. captaincranky

    captaincranky TechSpot Addict Topic Starter Posts: 10,664   +879

    The behaviour seems to have stopped, (at least for me), in the past hour *(!) or (?)

    I was not able to access this thread earlier today, (ironic, I knoooowww).


    Despite the red underline, "behaviour" is not misspelled. I spell it that way out of respect for Leeky, who simply won't spell it my way! (just kidding)
  8. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    Ok, this seems to be more widespread than I hoped for... we will be onto this soon.
  9. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    It would be useful to know for troubleshooting purposes if you are getting these on the forum only or also on the main site (if you visit both and open different pages on either side). Thanks!
  10. captaincranky

    captaincranky TechSpot Addict Topic Starter Posts: 10,664   +879

    OK, I'm on my Win 7 machine, and not getting errors.

    What I did was log out. I received the "cookies cleared" messaged, then shut down all instances of TS I had open.

    I surfed the forums, (not logged in), and attempted to access about 50 threads, in different categories, all successfully.

    Previously, I had been receiving this error only at the individual thread level, either attempting to access a thread, or attempting to submit a reply. The denial of access was somewhat random. In other words, I could access the same thread, or be denied access at different times.

    Ironically, it was this thread that was giving me the most trouble....:confused:

    Makes me wonder if the cookie was corrupt. Just a wild guess from someone who has no idea what he's talking about.

    I should add that the only scripts I have approved are Techspot, and Googleapis.
  11. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    But when you logged back in, did the problem persist? It's obvious you were able to post that last message, but we haven't really made any changes in the forums as of late nor are we experiencing any problems in our machines.

    That said, if there's a persistent issue for you and other users we will look into it and will appreciate your help troubleshooting the problem.
     
  12. Leeky

    Leeky TS Evangelist Posts: 4,378   +98

    There is a non-British version of the word "behaviour" ? I never even knew that! :haha:

    It seems OK on the board following most links now. I've just uploaded a picture to see if it persists there for me and it was fine on this occasion as well. It was submitting the "upload a new image form" that gave me the "502" errors before.

    I will add though that I did a cleanup on my PC last thing last night, and I also reset my router and modem as well, as I seemed to be getting a slower than usual connection.

    So seems OK on my front?
  13. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,527   +315

    To be honest, the gallery software's upload feature has always been tricky to troubleshoot and somewhat buggy, so let's no take that into account.

    What matters the most is that you and other members are not getting any random 502 errors when browsing around the forums or the main site. Personally I haven't had this happen even once but that doesn't mean there could be something going on.
  14. captaincranky

    captaincranky TechSpot Addict Topic Starter Posts: 10,664   +879

    Julio, thus far I have had no trouble with the "502 bad gateway" error since I undertook the remedies and investigation I outlined in post #10.

    I should add that I didn't close the browser, or reboot the machine. Logging out, and closing instances of TS seemed to cure the problem (!) or (?)

    This is with the Win 7 machine that was giving the trouble, and as I said, it has only been put into S-3, not restarted.
  15. jobeard

    jobeard TS Ambassador Posts: 13,403   +314

    for Apache servers, set MaxKeepAliveRequests hi (several hundred) but not ZERO
    and KeepAliveTimeout 15 (to 30 secs)
  16. Leeky

    Leeky TS Evangelist Posts: 4,378   +98

    ^^^^
    Yeah, what jobeard said! :haha:

    (As I think wtf to myself...)
  17. jobeard

    jobeard TS Ambassador Posts: 13,403   +314

    Hope I didn't offend with that comment; it would seem to me that the server is keeping too many KeepAlive Sessions for too long.

    I'm sure other opinions would be welcomed by Julio :)
  18. mario

    mario Ex-TS Developer Posts: 399   +17

    We are served on Nginx not on Apache ;)
  19. jobeard

    jobeard TS Ambassador Posts: 13,403   +314

    extrapolate the intent:- investigate the KeepAlive configuration. Too many for too long will starve any server :wink
  20. mario

    mario Ex-TS Developer Posts: 399   +17

    I know, I already looked into those settings and they seem to be ok. We'll investigate further.
  21. Benny26

    Benny26 TechSpot Paladin Posts: 1,575   +47

    Hmmm...About 3 week ago (roughly same time this thread was started), i tried to report 2 spamming bad posts and got hit with the "502" brick wall. I'll bet that was related.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.