Welcome! Log In Create A New Profile

Advanced

memcached problems...

Juergen Gotteswinter
August 31, 2009 02:05PM
Hallo folks again,

i try to configure nginx to deliver swf files etc, and wanted to cache
them within memcached. but until now i didnt have much success with that.
what i already did:

include/excluded parts of the config (flv part, swf part & php part) and
tested them one by one. no change... but if i try to open a sfv file via
browser i see that nginx communicates with memcached and this error
messages appears in the nginx error log (without the memcached part in
the config i get the file as download, like expected)

2009/08/31 18:34:40 [info] 23808#0: *1 key:
"/files/_somewhere/xxx/xxxx.flv" was not found by memcached while
reading response header from upstream, client: 62.
116.129.3, server: media, request: "GET /files/_somewhere/xxx/xxxx.flv
HTTP/1.1", upstream: "memcached://127.0.0.1:11211", host: "ftp.xxx.org:8
1"

it seems that nginx looks in memcached for the file, but it has not yet
read from the disk so nginx cant find it inside memcached and throws me
a 404


heres my nginx.conf



http {
include /etc/nginx/mime.types;
default_type application/octet-stream;


log_format main '$http_host $remote_addr - $remote_user
[$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;
server {
listen 81;
server_name media;

#charset koi8-r;

#access_log logs/host.access.log main;


location / {
root /home/www/htdocs;
index index.html index.htm;


error_page 404 http://failover.somewhere.de/404.html;

location ~ \.flv$ {
memcached_pass 127.0.0.1:11211;
set $memcached_key $uri;
root /home/www/htdocs;
}

location ~ \.swf$ {
set $memcached_key $uri;
memcached_pass 127.0.0.1:11211;
root /home/www/htdocs;
}

location ~ /\.ht* {
deny all;
}
}
}
Subject Author Posted

memcached problems...

Juergen Gotteswinter August 31, 2009 02:05PM

Re: memcached problems...

Igor Sysoev August 31, 2009 03:49PM

Re: memcached problems...

JG August 31, 2009 05:34PM

Re: memcached problems...

Istv August 31, 2009 05:41PM

Re: memcached problems...

JG August 31, 2009 06:15PM

Re: memcached problems...

JG September 02, 2009 05:37PM

Re: memcached problems...

JG September 02, 2009 05:56PM

Re: memcached problems...

JG September 02, 2009 05:58PM

Re: memcached problems...

Igor Sysoev September 03, 2009 05:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 238
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready