Forum Moderators: phranque

Message Too Old, No Replies

How can I log every 502?

Having ponctual 502 issues but no way to figure out a pattern or timeline

         

Nosuchthing

8:21 pm on Oct 10, 2024 (gmt 0)

5+ Year Member Top Contributors Of The Month



I am getting some 502s myself from time to time. Fixed with a simple refresh.

It would not be such an important issue if not for my ad spend.

I want to be able to log every single instance where something goes against expectations, starting with 502s and hopefully further. I am sure there is a way to do so.

Can you guys recommand a tool for this?

This might not be the right subforum, feel free to move it.

not2easy

8:57 pm on Oct 10, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I suppose you could create a custom 502 error page to send you a notification each time the error is triggered.

If you're on Apache, this question might be more on topic in the Apache forum.
If you're on IIS there is a forum for that too.

The Charter for this forum: [webmasterworld.com...] covers Protocols, Client- and server-side technology, Website Security Issues, Programming and such issues so it should be fine here too.

It helps before folks make suggestions to know what your case involves and whether you are hoping for real-time information. ;)

phranque

10:40 pm on Oct 10, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you should be able to get a timeline of your 502 responses by examining the web server access log file.

lucy24

1:13 am on Oct 11, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



In addition to not2easy’s questions: is it your own server or shared hosting? This can affect which 500-class errors show up in access logs.

phranque

6:38 am on Jan 22, 2025 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you should be able to get a timeline of your 502 responses by examining the web server access log file.

is it your own server or shared hosting? This can affect which 500-class errors show up in access logs.

It is fairly possible, that the 502 is generated by a service running in front of your site.

in any case, the presence or absence of 502 responses in your web server access log files will be informative.

Vortex13

3:18 pm on Mar 21, 2025 (gmt 0)

Top Contributors Of The Month



The 502 error is most likely related to your hosting's resource limitations.
Check your control panel to see if you are exceeding your allocated resources or contact your hosting support. They should explain the reason in detail and tell you where your site's logs are and what errors they are recording.