# Need to identify blocked requests vs other requests

**URL:** <https://www.ruby-forum.com/t/need-to-identify-blocked-requests-vs-other-requests/219776>\
**Category:** NGINX\
**Created:** [May 16, 2012, 2:10am UTC](https://www.ruby-forum.com/t/need-to-identify-blocked-requests-vs-other-requests/219776 "2012-05-16T02:10:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [May 16, 2012, 2:10am UTC](https://www.ruby-forum.com/t/need-to-identify-blocked-requests-vs-other-requests/219776/1 "2012-05-16T02:10:18Z")

</div>

Hello there,

As limit\_req returns 503 as well other 503 (service unavailable) native  
errors I need a way to differentiate them in the access log.

One easy way would be to be able to set the status limit\_req returns,  
would  
be that possible?

The main reason I’m asking this it’s because we analyze our logs in real  
time to alert on certain values, until limit\_req I used to hsend alerts  
if  
more than X 503 status were seen in a time range. However, now I’ve  
limit\_req legitimate 503 which have nothing to do with the 503 of  
Service  
unavailable which indeed need to take action.

Any ideas?

Thank you!

Guzmn

---

<div class="post-metadata">

**Author:** ![SSGuzmSSn\_BrasS\_SS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/58956e/32.png) [@SSGuzmSSn\_BrasS\_SS\_S](https://www.ruby-forum.com/u/SSGuzmSSn_BrasS_SS_S)\
**Post date:** [May 16, 2012, 10:08am UTC](https://www.ruby-forum.com/t/need-to-identify-blocked-requests-vs-other-requests/219776/2 "2012-05-16T10:08:14Z")

</div>

Hello!

On Tue, May 15, 2012 at 09:09:11PM -0300, Guzmán Brasó wrote:

> more than X 503 status were seen in a time range. However, now I’ve  
> limit\_req legitimate 503 which have nothing to do with the 503 of Service  
> unavailable which indeed need to take action.

The only cases when nginx generates 503 by itself is limit\_req and  
limit\_conn. Hence simple solution would be to log $upstream\_status.

Maxim D.
