So I had 3 sites configured to use caching on my nginx box (tried with
.50, 52 and 53 build) however of the three websites kept redirecting
me to the first site that I was doing caching for.
Example Sites:
0.0.0.1
0.0.0.2
0.0.0.3
HTTP config very similar to this only each utilize a different
“listen” ip address and each site has a different Backend 'Origin" ip:
HTTP LB
upstream LB_HTTP_0.0.0.1 {
server x.x.x.x:80;
}
server {
listen 0.0.0.1:80;
server_name website_0.0.0.1;
access_log /var/log/nginx/any.website_0.0.0.1.access_log
When browsing to 0.0.0.1, everything was fine
going to 0.0.0.2 or 0.0.0.3 or any other ip for that matter in the
same class C “/24” it would redirect you to the 0.0.0.1 config which
would then proxy-pass the data back to the origin belonging to the
0.0.0.1 config
Anyone seen this issue at all?
Once i commented all proxy_cache and restarted nginx, problem went away.
Note that i even tried deleting /etc/nginx-cache/* and recreating
it… did not help
going to 0.0.0.2 or 0.0.0.3 or any other ip for that matter in the
Thanks,
Hey Igor,
That was the problem… I was using “backend” for each of the configs
so it was confused. Which would you recommend for stability and
scalability, attaching a dynamic $ to the proxy_cache_key or creating
a separate cache for each site that requires caching?
keep in mind that id like to support up to 500 sites per box if
possible, each doing anywhere from 1mbps to +10mbps
Unique proxy_cache_key is enough. The different proxy_cache_path’s are
required just for simple addministration, say, max_size, inactivity,
etc.
That was the problem… I was using “backend” for each of the configs
so it was confused. Which would you recommend for stability and
scalability, attaching a dynamic $ to the proxy_cache_key or creating
a separate cache for each site that requires caching?
keep in mind that id like to support up to 500 sites per box if
possible, each doing anywhere from 1mbps to +10mbps
nginx uses md5 create a cache key and use the key as path to a cache
file,
90e8de013d4126fbab247d12350fdda0 in you case. Besides, in the file there
is crc32 of the original key to test possible md5 collisions.
Could you run
head -1 /usr/local/nginx/cache/0/da/90e8de013d4126fbab247d12350fdda0 |
hexdump
head -2 /usr/local/nginx/cache/0/da/90e8de013d4126fbab247d12350fdda0 |
tail -1
On Sun, May 03, 2009 at 02:05:57AM -0400, Jim O. wrote:
location / {
listen 80;
location / {
For what it may be worth, I have seen some md5 collisions in the error
collision, client: my.ip.addr.ess, server: mydomain.com, request: "GET
For what it may be worth, I have seen some md5 collisions in the error
collision, client: my.ip.addr.ess, server: mydomain.com, request: "GET
Could you run
It’s seems like nginx bug. Could you create debug log ?
I’m sure I could… if only I knew how.
Can you please give me the steps you want me to take?
It will have to wait a few hours. It’s ~ 0315 here and I’m going to bed.
./configure --with-debug …
nginx.conf:
error_log /path/to/log debug;
or, if you can easy reproduce the bug with single request:
Can anyone please tell me who is going to serve the requests on
x.x.x.x:80; above? In other words, which process is actually going to
act as the backend?
Is that another nginx server section?
Thanks.
al
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.