Weird 0.8.11.1 connections spike

Anything else you want me to poke at?

p ((ngx_http_request_t *) ngx_cycle->connections[9].data)->main->blocked

13 included for completeness:

(gdb) p ((ngx_http_request_t *)
ngx_cycle->connections[9].data)->main->blocked
$1 = 0
(gdb) p ((ngx_http_request_t *)
ngx_cycle->connections[13].data)->main->blocked
$2 = 0

  • Jeff

On Mon, Aug 31, 2009 at 06:36:24PM +1000, Jeff W. wrote:

}
domain’s root (such as favicon.ico), then from the generic $wordpress_root
for files provided by the WordPress distribution (such as everything under
/wp-includes as with the .js example in the debugging), then finally pass
anything else to PHP.

Probably, this is the problem, I will investigate this type of
configuration.

However, you try this:

location / {
root /srv;
try_files /example.com/root$uri
/example.com/root$uri/
/wordpress/root/$uri
/wordpress/root/$uri/
/index.php?q=$request_uri;
}

The reason why try_files tests files only against “root” is because
there is also “alias” that can be not expressed via simple
concatenation.

On Mon, Aug 31, 2009 at 06:36:24PM +1000, Jeff W. wrote:

}
domain’s root (such as favicon.ico), then from the generic $wordpress_root
for files provided by the WordPress distribution (such as everything under
/wp-includes as with the .js example in the debugging), then finally pass
anything else to PHP.

The patch.

Igor S. wrote:

connection 1015

  1. set in nginx.conf:
    No. The coredump is enough, it’s just should have debug info (gcc -g

where NN is NN from log message.
the error log like:
GNU gdb Red Hat Linux (6.5-37.el5_2.2rh)
Core was generated by `ro root=LABEL=/ console=tty0
Cannot access memory at address 0x130

It looks as though you got the data that you needed overnight in my time
zone. That server does use a try_files directive:

location /forums/ {
try_files $uri $uri/ /forums/vbseo.php;

}

Previously we used a rewrite:

#if (!-e $request_filename) {
#rewrite ^/forums/(.*)$ /forums/vbseo.php last;
#}

which ironically would probably not have caused this difficulty.

I’ll try 0.8.12 and report if any difficulties unless you want me to
generate another coredump with 0.8.11

Jim

On Mon, Aug 31, 2009 at 08:14:12AM -0400, Jim O. wrote:

#if (!-e $request_filename) {
#rewrite ^/forums/(.*)$ /forums/vbseo.php last;
#}

which ironically would probably not have caused this difficulty.

I’ll try 0.8.12 and report if any difficulties unless you want me to
generate another coredump with 0.8.11

This bug should be fixed in 0.8.12.

The reason why try_files tests files only against “root” is because
there is also “alias” that can be not expressed via simple concatenation.

Hmm. This appears to make a ridiculous amount of sense. :wink:

Is it impossible to provide a fully qualified path to try_files? I can’t
do
something like:

root /srv/example.com/root;
try_files /srv/example.com/root$uri
/index.php?q=$request_uri;

Will that check for /srv/example.com/root/srv/example.com/root$uri ?

How about $document_root in try_files?

root /srv/example.com/root;
set $wordpress_root /srv/wordpress/root;
try_files
$document_root$uri $document_root$uri/
$wordpress_root$uri $wordpress_root$uri/
/index.php?q=$request_uri;

(I’ll test the patch you posted regardless of these questions.)

Thanks,

  • Jeff

On Mon, Aug 31, 2009 at 11:54:18PM +1000, Jeff W. wrote:

              /index.php?q=$request_uri;

root /srv/example.com/root;
try_files /srv/example.com/root$uri
/index.php?q=$request_uri;

Will that check for /srv/example.com/root/srv/example.com/root$uri ?

Yes.

How about $document_root in try_files?

root /srv/example.com/root;
set $wordpress_root /srv/wordpress/root;
try_files
$document_root$uri $document_root$uri/
$wordpress_root$uri $wordpress_root$uri/
/index.php?q=$request_uri;

Suppose configuration:

 location /one/ {
     alias  /path/two/;
     try_files  $uri  ...;
 }

Here try_files will test “/path/two/page” for “/one/page”.
“$document_root$uri” will be /path/two/one/page".