My favorites | Sign in
Project Logo
             
Search
for
Updated Mar 04, 2009 by shinepf
Labels: Featured, Phase-Deploy
HowToNcacheV3  

#V3 is for 64bit OS,Linux or FreeBSD.

#64 is for the 64-bit platform

Install

tar -vxzf ncache-3.0_64.tar.gz

mv -fR ncache nginx-0.6.34/src/http/modules/

./configure --add-module=src/http/modules/ncache/

make 

make install

Config

vi your nginx config file "/usr/local/nginx/conf/nginx.conf"

user www www;

worker_processes 4;

worker_rlimit_nofile 20480;

error_log  logs/error.log;

events 
{
	use epoll;

	worker_connections 81920;
}

http 
{
	keepalive_timeout 10;
	
	ncache_max_size 24;

	proxy_buffering off;

        ncache_dir /data1/cache_file  60;#the file for storage,60G
        ncache_dir /data2/cache_file  60;
    	hash_index_dir /data1/ncache_index;#v3.1,you need to define the index file position
	auto_delete_file on;#enable the auto delete file
	ncache_ignore_client_no_cache on;
	
	upstream backend 
	{
            server 10.0.0.1;
	}

	sendfile on;

	send_timeout 10;

	client_header_timeout 10;


	tcp_nodelay on;
    	
	log_format main      '$proxy_add_x_forwarded_for - $remote_user [$time_local] '
                             '"$request" $status $bytes_sent '
                             '"$http_referer" "$http_user_agent" $remote_addr';

	include "mime.types";

        default_type text/html;

	server 
	{
		server_name  .blog.sina.com.cn;

		listen *:80;
		
		set $xvia "blog.sina.com.cn";	
    
		set $proxy_add_agent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NginxCache)";
                access_log logs/blog.sina.com.cn-access_log main;

		location / 
		{

			if ($request_method ~ "PURGE")
			{
					rewrite (.*) /PURGE$1 last;
			}
		

			ncache_http_cache;

			error_page  404 = /fetch$request_uri;
			
			add_header      Sina-Cache   $xvia;

		}

		location /ncache_state
                {
                    ncache_state;
                }


		location /fetch
                {
                    internal;
                    proxy_pass http://backend;
                    add_header      Sina-Cache   $xvia;
                    proxy_hide_header	User-Agent;
                    proxy_set_header	User-Agent $proxy_add_agent;
                    proxy_set_header	X-Forwarded-For $proxy_add_x_forwarded_for;
                }


		location /PURGE/ 
                {      	
                    access_log logs/purge.blog.sina.com.cn-access_log main;
                    internal;
                    allow 10.55.37.0/24;
                    allow 10.69.3.0/24;
                    allow 10.49.10.0/24;
                    deny    all;
                    ncache_purge;
                }      
 
	}

}

Run

/usr/local/nginx/sbin/nginx

Stop

killall -9 nginx

Clean

the clean shell:

#! /bin/sh

kill -9 `ps auwx|grep nginx|awk '{print $2}'`

killall -9 nginx

rm ../logs/ncache_index

echo "" > ../logs/error.log


rm /data0/ncache_file
rm /data1/ncache_file
rm /data2/ncache_file
rm /data3/ncache_file

State

curl "http://127.0.0.1/ncache_state"

Backend Set

you must add the http header "Cache-Control: max-age=" to the backend server which you want to be cached, ortherwise, ncache will not cache it forever.
you must have the "content-len" header in the backend and send it to the ncache.
if you set max-age < 1 minute ncache will set it to 1 minute, and ncache will exact all max-age to minute, so please align it to 60.
about the auto delete files process,it deletes the inactive cached data,about 20% of the total data.it runs at 2:00 every day.

Comment by denk.junk.mail, Jan 12, 2009

"killall -9 nginx"

-9? Seriously?

Comment by shinepf, Jan 15, 2009

yes

Comment by kylic1977, Jan 23, 2009

I installed ncache V3 on a server with Centos 4.6 64bit,after running, I tailed the error log, and found a lot error message like this:

2009/01/24 09:59:09 error? 3635#0: 822 cache_from_mem error: file size is not equal the storage size while sending response to client, client: 222.71.103.247, server: abb.abb.cn, request: "GET /photo/2008/10/16/10419149_19580774.jpg HTTP/1.1", host: "abb.abb.cn", referrer: "http://abb.abb.cn/24045.shtml"

so,can u tell me what's the matter? thx

Comment by denk.junk.mail, Jan 27, 2009

shinepf,

Why such harsh measures? Nginx supports nicer shutdown via SIGQUIT or SIGTERM. Is there any reason not to use them?

Comment by favortelecom, Feb 04, 2009

I think kill -9 is for that nginx cannot release its port normally with ncache. such as: emerg? 26462#0: bind() to 0.0.0.0:80 failed (98: Address already in use) notice? 26462#0: try again to bind() after 500ms

Comment by junk.mailet, Feb 19, 2009

I have some questions about ncache

What does ncache_max_size 24; do? and is there any minimum size of ncache_dir? Is it possible to set how much ram memory that is used by ncache? Will use ncache to cache static files preferably in ram memory on the frontend servers if possible. Thanks

Comment by csabyka69, Mar 09, 2009

2009/03/09 16:35:53 emerg? 15577#0: ncache_index_fd < 0 2009/03/09 16:35:53 emerg? 15577#0: ncache_http_proxy_shm_hash_init error whit nginx-0.7.40 and ncache-3.1_64 @ debian 2.6.26-1-amd64.

Have any idea to resolve ?

Comment by shinepf, Mar 09, 2009

this problem is because the index file could not be build

please check your accessbility, maybe use root can resolve it

Comment by csabyka69, Mar 11, 2009

user root dont help :( any other suggestion ?

Comment by shinepf, Mar 11, 2009

do u have enough disk space to have the hash_index file ? about 1g?

Comment by csabyka69, Mar 16, 2009

i have about 100G free space :( so i dont know what missing. Can i help with compile options?

Comment by shahan43, Mar 22, 2009

how can I have it cache only media files?

Comment by alex.mizrahi, May 14, 2009

hi.

a little question: if multiple requests for resource will come in simultaneouly, will it do a request to upstream for each such request or will wait until one request completes and send results for everyone?

i'm thinking about using ncache as a reverse proxy and would like it to cache resource for some small time, like seconds. i wonder if it will work fine in this case.

thanks.

Comment by hipertracker, Jun 11, 2009

It cannot be compiled for Nginx 0.8.1, Ubuntu 0.8.4 (amd64x2)

$ ./configure --pid-path=/var/run/nginx-0.8.1.pid --group=www-data --user=www-data --with-debug --with-cc-opt='-O3' --with-http_flv_module --with-http_realip_module --with-http_gzip_static_module --with-http_ssl_module --with-http_dav_module --with-http_stub_status_module --add-module=/usr/local/src/nginx-upstream-fair/ --add-module=/usr/local/src/nginx_uploadprogress_module/ --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/ext/nginx/' --add-module=/usr/local/src/ncache/ --with-cpu-opt=amd64

$ make 2>ERROR.txt

$ cat ERROR.txt
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'page_alloc':
/usr/local/src/ncache//ncache_http_get_cache_module.c:254: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_get_request_path':
/usr/local/src/ncache//ncache_http_get_cache_module.c:433: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:435: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:436: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:445: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:447: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:448: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:459: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:464: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:468: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_get_md5':
/usr/local/src/ncache//ncache_http_get_cache_module.c:477: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:477: error: 'ngx_http_cache_t' has no member named 'path'
/usr/local/src/ncache//ncache_http_get_cache_module.c:478: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_get_hash_index':
/usr/local/src/ncache//ncache_http_get_cache_module.c:488: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_shm_hash_exist':
/usr/local/src/ncache//ncache_http_get_cache_module.c:572: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_set_gzip':
/usr/local/src/ncache//ncache_http_get_cache_module.c:733: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_get_cache_from_mem':
/usr/local/src/ncache//ncache_http_get_cache_module.c:787: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:792: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:799: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:801: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:917: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:940: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:940: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_free_reset':
/usr/local/src/ncache//ncache_http_get_cache_module.c:967: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:971: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:974: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:975: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:977: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:982: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:983: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_get_cache_handler':
/usr/local/src/ncache//ncache_http_get_cache_module.c:1051: error: 'ngx_http_cache_t' has no member named 'file_start'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1054: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1060: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1064: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1080: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1103: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1106: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1115: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1190: error: 'ngx_http_cache_t' has no member named 'crc'
cc1: warnings being treated as errors
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'delete_file_cycle':
/usr/local/src/ncache//ncache_http_get_cache_module.c:1808: warning: no return statement in function returning non-void
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_get_hash_index':
/usr/local/src/ncache//ncache_http_get_cache_module.c:1876: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1883: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1886: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ngx_http_shm_hash_del':
/usr/local/src/ncache//ncache_http_get_cache_module.c:1901: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ncache_http_proxy_purge_handler':
/usr/local/src/ncache//ncache_http_get_cache_module.c:1945: error: 'ngx_http_cache_t' has no member named 'md5'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1947: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:1952: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ngx_http_ncache_header_filter':
/usr/local/src/ncache//ncache_http_get_cache_module.c:2208: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2211: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2236: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2241: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2302: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2323: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2324: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2337: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2338: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2345: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2356: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2360: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c: In function 'ngx_http_ncache_body_filter':
/usr/local/src/ncache//ncache_http_get_cache_module.c:2394: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2396: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2418: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2419: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2420: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2428: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2429: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2430: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2436: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2442: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2461: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2463: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2470: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2472: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2497: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2499: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2533: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2536: error: 'ngx_http_cache_t' has no member named 'crc'
/usr/local/src/ncache//ncache_http_get_cache_module.c:2537: error: 'ngx_http_cache_t' has no member named 'crc'
make[1]: *** [objs/addon/ncache/ncache_http_get_cache_module.o] Error 1
make: *** [build] Error 2
Comment by xufeng...@sina.com, Jun 18, 2009

You said " you must have the "content-len" header in the backend and send it to the ncache. " I use lighttpd as the backend web server serving html files,and ncache only receive max-age header and no content-length is available ( Transfer-Encoding: chunked ) and still it caches. Why?

Comment by ilya.ruprecht, Jun 25, 2009

I can't compile ncache-2.3 for nginx-0.7.59 on 32bit-cpu too:

I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/ncache-2.3/ncache_http_get_cache_module.o \
                src/http/modules/ncache-2.3/ncache_http_get_cache_module.c
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_get_request_path’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:531: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:533: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:534: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:543: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:545: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:546: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:558: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:563: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:567: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_get_md5’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:576: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:576: error: ‘ngx_http_cache_t’ has no member named ‘path’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:577: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_get_hash_index’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:587: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_get_path’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:986: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_shm_is_timeout’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1242: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1245: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1246: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1249: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1251: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1252: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_set_gzip’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1304: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_get_cache_handler’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1380: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1391: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:1396: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ngx_http_upstream_cache_lio_write’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2152: error: ‘ngx_http_cache_t’ has no member named ‘expires’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2153: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2154: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_get_hash_index’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2214: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2221: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2224: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ngx_http_shm_hash_del’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2246: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2249: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2251: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ncache_http_proxy_purge_handler’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2302: error: ‘ngx_http_cache_t’ has no member named ‘md5’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2304: error: ‘ngx_http_cache_t’ has no member named ‘crc’
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c: In function ‘ngx_http_upstream_cache_header_filter’:
src/http/modules/ncache-2.3/ncache_http_get_cache_module.c:2535: error: ‘ngx_http_cache_t’ has no member named ‘expires’
make[1]: *** [objs/addon/ncache-2.3/ncache_http_get_cache_module.o] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-0.7.59'
make: *** [build] Error 2

Please Help!

:-(

Comment by travisdbell, Jun 30, 2009

Seems to be a problem with the 0.7.x series. Had the same make errors myself, tried with the latest 0.6.x and she compiled just fine.

Comment by glennaaldering, Jul 03, 2009

Ubuntu Hardy Heron 8.04 :

Does not compile nginx-0.7.61 with ncache-3.1:

Does not compile nginx-0.8.4 with ncache-3.1:

Does compile nginx-0.6.38 with ncache-3.1:

Comment by cschmetsdorf, Aug 06, 2009

Hi, i have configured the ncache as shown above.

But i get the following error: 2009/08/06 10:43:37 error? 11082#0: 35 no space on the disk: used pages = 0,total pages =15697968,need nums = 4503599627370496,used_file_num = 1 while reading response header from upstream, ... on the Disk 90 GB available.

Can anyone give me a hint?

Comment by richzendy, Sep 16, 2009

I have this error:

Starting nginx: 2009/09/16 07:13:09 emerg? 27118#0: "ncache_dir" directive mmap failure in /etc/nginx/nginx.conf:64

What it's wrong with a ncache_dir directive?


Sign in to add a comment
Hosted by Google Code