nginx segfault problem

andyhuax nginx-forum at nginx.us
Wed Jan 5 09:50:15 MSK 2011


Thanks all,
[b]1. Get the core dump, use gdb to print the stacktrace.[/b]
I have no idea how to do this,i will try later

[b]2. Print your Nginx version: ./nginx -V[/b]

[color=#9933FF]nginx version: nginx/0.8.40
TLS SNI support disabled
configure arguments: --user=nginx --group=nginx
--prefix=/usr/local/nginx-0.8.40
--sbin-path=/usr/local/nginx-0.8.40/bin/nginx
--conf-path=/usr/local/nginx-0.8.40/conf/nginx.conf
--pid-path=/var/run/nginx.pid --with-pcre=../pcre-7.8
--with-http_stub_status_module --with-http_sub_module
--with-http_ssl_module --add-module=../nginx_http_push_module-0.692/
--add-module=../agentzh-chunkin-nginx-module-0f492bf/[/color]

[b]3. Put your Nginx's config file.[/b]

[color=#9933FF]user  nobody nobody;

worker_processes 10;

#error_log  /var/logs/error.log;
#error_log  /var/logs/error.log  notice;
#error_log  /var/logs/error.log  info;
pid        /var/run/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by
this process.
worker_rlimit_nofile 51200;

events
{
       use epoll;
       #maxclient = worker_processes * worker_connections / cpu_number
       worker_connections 51200;
}

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

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

        log_format download  '$remote_addr - $remote_user [$time_local]
'
                             '"$request" $status $bytes_sent '
                             '"$http_referer" "$http_user_agent" '
                             '"$http_range"
"$sent_http_content_range"';

       sendfile on;
       tcp_nopush     on;
       tcp_nodelay    on;
       #send_lowat     12000;


       keepalive_timeout 75 20;
       request_pool_size        4k;
       connection_pool_size        256;
    
       client_header_timeout  3m;
       client_body_timeout    3m;
       send_timeout           3m;

       client_header_buffer_size    1k;
       large_client_header_buffers    4 2k;

       output_buffers   4 32k;
       postpone_output  1460;
       client_max_body_size       10m;
       client_body_buffer_size    256k;
       client_body_temp_path 	/dev/shm/client_body_temp; 
       proxy_temp_path            /usr/local/nginx/proxy_temp;
       fastcgi_temp_path          /usr/local/nginx/fastcgi_temp;
     
       #gzip
       gzip on;
       gzip_http_version 1.1;
       gzip_comp_level 2;
       gzip_proxied any;
       gzip_types text/plain  text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;
       gzip_min_length 1100;
       gzip_buffers 4 8k;
       
       # The following includes are specified for virtual hosts
       include          vhosts/host1.conf;
}[/color]

###############################################################
[b]host1.conf:[/b]

[color=#9933FF]###host1 setting start,add by script###########
server {
    listen       80;
    server_name  host1  www.dhaxx.com;
    index index.html index.htm index.php;
    root  /data/wwwroot/host1/webroot;
    
#error_page  404              /404error/404.html;
#error_page  500 502 503 504  /404error/50x.html;
    location = /favicon.ico {
        log_not_found off;
    }
    
    location ~ .*\.php?$
    {
    include fastcgi_params;
    fastcgi_pass  127.0.0.1:10080;
    #fastcgi_pass  unix:/usr/local/php/etc/php-cgi.socket;
    fastcgi_index index.php;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    fastcgi_param  SCRIPT_FILENAME 
/data/wwwroot/host1/webroot$fastcgi_script_name;
}

location /intime {
    push_channel_group pushmodule_chat;
    
    location /intime/publish {
        set $push_channel_id $arg_id; #static channel id
        push_publisher;
        push_message_timeout 5m;
        push_message_buffer_length 0;
    }
    location /intime/subscribe {
#push_authorized_channels_only on;
        set $push_channel_id $arg_id; #static channel id
        push_subscriber;
        send_timeout 3600; #so that nginx won't drop connections
willy-nilly
    }
}
location ~* ^/(?!intime) {
    if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;
    }
} 
location ~ ^/upload/ {
    root /data/upload/host1/upload;
    expires      30d;
}

location ~* /upload/.*\.php$ {
deny    all;
}

location ~ ^/cache/ {
    root /data/upload/host1/upload;
}

location ~ ^/weblogs/ {
    root /data/weblogs/host1;
    allow  218.5.2.219;
    allow  220.250.21.82;
    allow  121.207.254.240/28;
    deny    all;
    auth_basic            "Restricted";
    auth_basic_user_file  passwd/weblogs;
}

location ~* \.(gif|jpg|jpeg|css|js|bmp|png)$ {
expires  max;
}


if (-d $request_filename) {
    rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}
rewrite ^/slr/([0-9A-Za-z]+)/?$ /slr/yourls-go.php?id=$1 last;
rewrite ^/slr/([0-9A-Za-z]+)\+/?$ /slr/yourls-infos.php?id=$1 last;
rewrite ^/slr/([0-9A-Za-z]+)\+all/?$ /slr/yourls-infos.php?id=$1&all=1
last;

error_log  /data/httplogs/host1-error.log;
access_log  /data/httplogs/host1-aceess.log main;

}
###setting start,add by script###########
server {
    listen       443;
    server_name  host1  momo.im www.momo.im;
    index index.html index.htm index.php;
    root  /data/wwwroot/host1/webroot;
    ssl                  on;
#ssl_protocols SSLv3 TLSv1; 
#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

#ssl_prefer_server_ciphers on; 
    ssl_session_timeout 5m;
    ssl_certificate     /usr/local/nginx/conf/ssl/momo_im.pem;
    ssl_certificate_key  /usr/local/nginx/conf/ssl/momo.im.new.key;
#error_page  404              /404error/404.html;
#error_page  500 502 503 504  /404error/50x.html;
    location = /favicon.ico {
        log_not_found off;
    }
    
    location ~ .*\.php?$
    {
    include fastcgi_params;
    fastcgi_pass  127.0.0.1:10080;
    #fastcgi_pass  unix:/usr/local/php/etc/php-cgi.socket;
    fastcgi_index index.php;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    fastcgi_param  SCRIPT_FILENAME 
/data/wwwroot/host1/webroot$fastcgi_script_name;
}

location /intime {
    push_channel_group pushmodule_chat;
    
    location /intime/publish {
        set $push_channel_id $arg_id; #static channel id
        push_publisher;
        push_message_timeout 5m;
        push_message_buffer_length 0;
    }
    location /intime/subscribe {
#push_authorized_channels_only on;
        set $push_channel_id $arg_id; #static channel id
        push_subscriber;
        send_timeout 3600; #so that nginx won't drop connections
willy-nilly
    }
}
location ~* ^/(?!intime) {
    if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;
    }
} 
location ~ ^/upload/ {
    root /data/upload/host1/upload;
    expires      30d;
}

location ~* /upload/.*\.php$ {
deny    all;
}

location ~ ^/cache/ {
    root /data/upload/host1/upload;
}

location ~ ^/weblogs/ {
    root /data/weblogs/host1;
    allow  218.5.2.219;
    allow  220.250.21.82;
    allow  121.207.254.240/28;
    deny    all;
    auth_basic            "Restricted";
    auth_basic_user_file  passwd/weblogs;
}

location ~* \.(gif|jpg|jpeg|css|js|bmp|png)$ {
expires  max;
}


if (-d $request_filename) {
    rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}
rewrite ^/slr/([0-9A-Za-z]+)/?$ /slr/yourls-go.php?id=$1 last;
rewrite ^/slr/([0-9A-Za-z]+)\+/?$ /slr/yourls-infos.php?id=$1 last;
rewrite ^/slr/([0-9A-Za-z]+)\+all/?$ /slr/yourls-infos.php?id=$1&all=1
last;

error_log  /data/httplogs/host1-error.log;
access_log  /data/httplogs/host1-aceess.log main;

}[/color]

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,163596,163616#msg-163616




More information about the nginx mailing list