If you have online data,you can use tcpcopy to test your system. https://github.com/wangbin579/tcpcopy or http://code.google.com/p/tcpcopy/by wangbin579 - Nginx Mailing List - English
nginx-0.8.53 has the same problemby wangbin579 - Nginx Mailing List - English
# /home/nginx/sbin/nginx -V nginx: nginx version: nginx/1.0.10 nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48) nginx: TLS SNI support enabled nginx: configure arguments: --prefix=/home/nginx --user=nginx --group=nginx --without-select_module --without-poll_module --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --without-http_by wangbin579 - Nginx Mailing List - English
we use gcore to generate a core file. the backtrace is as the following: #0 0x000000000046ae0b in ngx_http_upstream_get_round_robin_peer (pc=0x1b822678, data=0x1b826e10) at src/http/ngx_http_upstream_round_robin.c:482 #1 0x00000000004a6a60 in ngx_http_upstream_get_keepalive_peer (pc=0x1b822678, data=0x1b826de0) at ../ngx_http_upstream_keepalive-c6396fef9295/ngx_http_upstream_kby wangbin579 - Nginx Mailing List - English
we find all processes of nginx are all nearly cpu 100%. we used tcpcopy to find this problem.by wangbin579 - Nginx Mailing List - English
The function ngx_http_upstream_get_round_robin_peer in nginx will loop for a long period of times when pc->tries equals to 0. Well then, under what conditions does pc->tries equal to zero? When executing ngx_http_upstream_get_round_robin_peer for the first time, in some cases it returns NGX_OK while pc->tries equals to 1. When in ngx_http_upstream_process_header, nginx process mby wangbin579 - Nginx Mailing List - English
tcpcopy-0.2.1.tar.gz is now available. Try it and I believe you will like this toolby wangbin579 - Nginx Mailing List - English
this module has been running stably in a large project for more than 2 monthsby wangbin579 - Nginx Mailing List - English
this module is running stable in a large project for more than 2 monthsby wangbin579 - Nginx Mailing List - English
Name: tcpcopy It is a request replication tool and is mainly for testing tasks using netlink and raw sockets Description: It can help you find bugs in your online project without actually being online. And it can also be used to test the stress that a system could endure. For example, if your system already has "memcached" subsystem and you want toby wangbin579 - Nginx Mailing List - English
a stress test for nginx written in chinese. http://blog.csdn.net/wangbin579/article/details/6929495by wangbin579 - Nginx Mailing List - English
An example: Suppose 13 and 14 are online machines, 148 is a target machine which is similar to the online machines, and 12321 is used both as local port and remote port. We use tcpcopy to test if 148 can endure two times of current online stress. Using tcpcopy to perform the above test task. the target machine(148) # modprobe ip_queue (if not run up)by wangbin579 - Nginx Mailing List - English
source code from mod_caucho.c (apache module) and resin source codeby wangbin579 - Nginx Mailing List - English
tcpcopy helps me a lot when deveploping the netease ad system and other systemsby wangbin579 - Nginx Mailing List - English
you can use tcpcopy to compare the performances of apache and nginx.by wangbin579 - Nginx Mailing List - English
With this module, Nginx can connect to Resin through hmux protocol directly. You also can use tcpcopy to test this module. nginx_hmux_module: https://github.com/wangbin579/nginx-hmux-module or http://code.google.com/p/nginx-hmux-module/ tcpcopy: https://github.com/wangbin579/tcpcopy or http://code.google.com/p/tcpcopy/by wangbin579 - Nginx Mailing List - English
Tcpcopy is an online request replication tool . It may be useful for migrating to nginx from apache https://github.com/wangbin579/tcpcopy or http://code.google.com/p/tcpcopy/by wangbin579 - Nginx Mailing List - English
Tcpcopy is an online request replication tool . It may be useful for migrating to nginx from apache https://github.com/wangbin579/tcpcopy or http://code.google.com/p/tcpcopy/by wangbin579 - Migration from Other Servers
all servers are running and nginx has the following error log every once in a while. 2010/07/27 08:37:57 1948#0: *429632943 connect() failed (111: Connection refused) while connecting to upstream, client: 125.45.229.167, server: xx.xxx.xxx, request: "GET xxxx HTTP/1.1", upstream: "server://xx.xxx.xxx.xxx:xxxxx", host: "xxx.xxx.xxx", referrer: "xxx"by wangbin579 - Nginx Mailing List - English
error_page 502 =200 /xxx$is_args$args;by wangbin579 - Nginx Mailing List - English
if all upstream servers are all down,then nginx disposes 502 and the original args is empty. if I want to redirect 502 to other handler with original args, how can I do?by wangbin579 - Nginx Mailing List - English
more detaily: it will call ngx_http_upstream_process_non_buffered_downstream(r) for sending response to the client and it seems that the server does not perform the active close beween the client and server.by wangbin579 - Nginx Mailing List - English
It seems that the server does not perform the active close normally in the memcache environment. If it is so,why ?by wangbin579 - Nginx Mailing List - English
for several reasons,the backend servers are socket backend servers,and nginx seems only support unix socket and http backend server. is any way to achieve that? thanksby wangbin579 - Nginx Mailing List - English
r->zero_body=1;????by wangbin579 - Nginx Mailing List - English
simply saying: how can I send header only when using redirection under keepalive modeby wangbin579 - Nginx Mailing List - English
the code is as the following: header->hash = 1; header->key.len = sizeof("Location") - 1; header->key.data=(u_char *) "Location"; header->value.len = strlen(param->redirectUrl); header->value.data=(u_char*)param->redirectUrl; r->header_only=1; r->headers_out.content_length_n=0; r->headers_out.content_type.len = sizeof("teby wangbin579 - Nginx Mailing List - English
thank you for allby wangbin579 - Nginx Mailing List - English
use strace,the system alerts:Resource temporarily unavailable recv(8, 0x9bfb880, 55, 0) = -1 EAGAIN (Resource temporarily unavailable) it appears that recv reads data when the data is not prepared. it does not check if the data is availableby wangbin579 - Nginx Mailing List - English
the http request: wget -O /tmp/re -S "http://***/setcookie" --post-data='username=liufeng&loginCookie=ayaheiheifn&domain=xxx.com' the http request sends two packets,and ngx_unix_recv is called two times. the first call does work properly, but the secend call fails:the call to recv returns -1. if the program sleeps for some time before recv call ,the system works properly.by wangbin579 - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |