# Error\_log levels

**URL:** <https://www.ruby-forum.com/t/error-log-levels/186578>\
**Category:** NGINX\
**Created:** [April 9, 2010, 4:18am UTC](https://www.ruby-forum.com/t/error-log-levels/186578 "2010-04-09T04:18:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@flash](https://www.ruby-forum.com/u/flash)\
**Post date:** [April 9, 2010, 4:18am UTC](https://www.ruby-forum.com/t/error-log-levels/186578/1 "2010-04-09T04:18:34Z")

</div>

I’m getting a lot of entries in my error\_log from memcache throwing a  
404 and sending the request to the back end.

2010/04/08 21:07:50 29914#0: \*3207 pcre\_exec() failed: -8 on  
“[example.com](http://example.com)” using “” while sending to client, client: 66.249.71.23,  
server: \_, request: “GET [example.com](http://example.com) HTTP/1.1”, upstream:  
“memcached://127.0.0.1:11211”, host: “[example.com](http://example.com)”

I’m assuming this is correct behavior since it cannot find the requested  
url in memory; however, I have not been able to find any error level  
descriptions in the docs - could you either fill me in on what level I  
need to include on my conf file or point me in the direction of where  
this info can be found?

I’m looking to remove the “alert” log events to try and clean up my  
error\_log a bit.

Thank you

Flash

Posted at Nginx Forum:

> **[error\_log levels](https://forum.nginx.org/read.php?2,72993,72993#msg-72993)**
>
> I'm getting a lot of entries in my error\_log from memcache throwing a 404 and sending the request to the back end. 2010/04/08 21:07:50 \[alert\] 29914#0: \*3207 pcre\_exec() failed: -8 on "example.com" using "" while sending to...

---

<div class="post-metadata">

**Author:** ![flash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@flash](https://www.ruby-forum.com/u/flash)\
**Post date:** [April 9, 2010, 11:31am UTC](https://www.ruby-forum.com/t/error-log-levels/186578/2 "2010-04-09T11:31:06Z")

</div>

Hello!

On Thu, Apr 08, 2010 at 10:18:03PM -0400, flash wrote:

> I’m getting a lot of entries in my error\_log from memcache  
> throwing a 404 and sending the request to the back end.
> 
> 2010/04/08 21:07:50 29914#0: \*3207 pcre\_exec() failed: -8 on “[example.com](http://example.com)” using “” while sending to client, client: 66.249.71.23, server: \_, request: “GET [example.com](http://example.com) HTTP/1.1”, upstream: “memcached://127.0.0.1:11211”, host: “[example.com](http://example.com)”
> 
> I’m assuming this is correct behavior since it cannot find the  
> requested url in memory;

No, it isn’t. It’s unexpected error returned by pcre\_exec()  
function, and according to pcreapi manpage it means the following:

```
     PCRE_ERROR_MATCHLIMIT (-8)

   The backtracking limit, as specified by the match_limit 

```

field in a  
pcre\_extra structure (or defaulted) was reached. See the  
description  
above.

You may want to investigate further why it happens. Default limit  
according to pcre docs is 10 million, so either you have  
completely wrong regex, or something wrong with your pcre library,  
or it’s nginx bug.

> however, I have not been able to find  
> any error level descriptions in the docs - could you either fill  
> me in on what level I need to include on my conf file or point  
> me in the direction of where this info can be found?

Logging levels from harmless to most critical are:

debug, info, notice, warn, error, crit, alert, emerg

It is not recommended to ignore any messages at crit level and above.

First part of this list can be found here:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.

---

<div class="post-metadata">

**Author:** ![flash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@flash](https://www.ruby-forum.com/u/flash)\
**Post date:** [April 10, 2010, 5:29am UTC](https://www.ruby-forum.com/t/error-log-levels/186578/3 "2010-04-10T05:29:29Z")

</div>

So I guess I need to start with my rewrites…here they are

rewrite ^/([0-9]+)/([\_0-9a-zA-Z-]+)/?$ $theme/listing.php?mls=$1 last;  
rewrite ^/([0-9]+)/([\_0-9a-zA-Z-]+)+.html?$ $theme/listing.php?mls=$1  
last;  
rewrite ^/([0-9]+)/?$ $theme/listing.php?mls=$1 last;  
rewrite ^/new-listings/new-listings-for-(+)-([0-9]+)-([\_0-9a-zA-Z-]+)/?$  
$theme/newListings.php?month=$1&day=$2 last;

here’s what I’m trying to capture

[example.com/](http://example.com/)(mls number)  
[example.com/](http://example.com/)(mls number)/(mls address).html  
[example.com/](http://example.com/)(mls number)/(mls address)/

the mls number is either a 6 digit or a 7 digit number  
mls address is really irrelevant from a technical standpoint but needed  
for SEO

These rewrites are working like I want them too but are they causing my  
prce errors?

Flash

Posted at Nginx Forum:

> **[Re: error\_log levels](https://forum.nginx.org/read.php?2,72993,73353#msg-73353)**
>
> I'm getting a lot of entries in my error\_log from memcache throwing a 404 and sending the request to the back end. 2010/04/08 21:07:50 \[alert\] 29914#0: \*3207 pcre\_exec() failed: -8 on "example.com" using "" while sending to...

---

<div class="post-metadata">

**Author:** ![flash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@flash](https://www.ruby-forum.com/u/flash)\
**Post date:** [April 10, 2010, 12:19pm UTC](https://www.ruby-forum.com/t/error-log-levels/186578/4 "2010-04-10T12:19:48Z")

</div>

Hello!

On Fri, Apr 09, 2010 at 11:28:29PM -0400, flash wrote:

> So I guess I need to start with my rewrites…here they are
> 
> rewrite ^/([0-9]+)/([\_0-9a-zA-Z-]+)/?$ $theme/listing.php?mls=$1 last;  
> rewrite ^/([0-9]+)/([\_0-9a-zA-Z-]+)+.html?$ $theme/listing.php?mls=$1 last;

This one will backtrack in an exponential way due to “(…+)+”  
construct. On long enough URL it will cause problems.

Here is pcretest session which demonstrates the problem:

$ pcretest  
PCRE version 7.9 2009-04-11

re\> !^/([0-9]+)/([\_0-9a-zA-Z-]+)+.html?$!  
data\> /1/1.html  
0: /1/1.html  
1: 1  
2: 1  
data\> /1/1.htmlx  
No match  
data\> /1/111111111111111111111111111111111111111111111111111111111.htmlx  
Error -8

[…]

> These rewrites are working like I want them too but are they  
> causing my prce errors?

Yes they are.

Maxim D.

---

<div class="post-metadata">

**Author:** ![flash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@flash](https://www.ruby-forum.com/u/flash)\
**Post date:** [April 11, 2010, 4:22am UTC](https://www.ruby-forum.com/t/error-log-levels/186578/5 "2010-04-11T04:22:12Z")

</div>

Maxim,

Thank you for your help, removing the second + in the highlighted line  
has removed that error from my logs.

Flash

Posted at Nginx Forum:

> **[Re: error\_log levels](https://forum.nginx.org/read.php?2,72993,73651#msg-73651)**
>
> I'm getting a lot of entries in my error\_log from memcache throwing a 404 and sending the request to the back end. 2010/04/08 21:07:50 \[alert\] 29914#0: \*3207 pcre\_exec() failed: -8 on "example.com" using "" while sending to...
