python 2.7 - nginx not forwarding upstream -


i have paster server set host multiple applications nginx proxying. reason, appears requests aren't being sent upstream nginx. i'm getting 404 errors in client, , "error" can find in logs following line nginx_error.log (being generated approximately once every 5 seconds):

2012/06/12 10:29:37 [info] 22289#0: *49 client closed prematurely connection while reading client request line, client: 192.168.10.135, server: localhost

some quality time on google indicates isn't application-breaking issue, it's have go on right now.

nginx.access.log prints following line every 5 seconds:

--[12/jun/2012:10:31:13 -0400]-4000--

no entry user actions being printed application log, despite there being several logging messages in application.

for reference, nginx.cfg looks like:

daemon             off;  error_log          /app_directory/logs/nginx_error.log info;  pid                /app_directory/var/nginx.pid;  worker_processes   1;   working_directory  /app_directory/var/;    events {   worker_connections 1024;  }   http {      # 3 parameters *_temp_path must here or nginx not start      client_body_temp_path /app_directory/var/lib/nginx/body;      proxy_temp_path       /app_directory/var/lib/nginx/proxy;      fastcgi_temp_path     /app_directory/var/lib/nginx/fastcgi;      include               /etc/nginx/mime.types;      default_type          application/octet-stream;      log_format            main $http_x_forwarded_for - [$time_local] "$request" $status $body_bytes_sent  "$http_referer" "$http_user_agent";     sendfile              on;      keepalive_timeout     0;      tcp_nodelay           on;      gzip                  on;      gzip_proxied          any;      gzip_types            text/plain text/html application/json application/xml;    upstream app_paste {     server 127.0.0.1:8001;     #server 127.0.0.1:8002;     #server 127.0.0.1:8003;     #server 127.0.0.1:8004;     #server 127.0.0.1:8005;     #server 127.0.0.1:8006;     #server 127.0.0.1:8007;     #server 127.0.0.1:8008;     #server 127.0.0.1:8009;     #server 127.0.0.1:8010;     #server 127.0.0.1:8011;     #server 127.0.0.1:8012;      }    server {     listen 8000;     server_name localhost;     access_log /app_directory/logs/nginx.access.log main;      location /crossdomain.xml {       root /app_directory/www;     }      location /v1 {       proxy_pass http://app_paste;     }      location /v2 {       proxy_pass http://app_paste;     }      }  } 

my application configuration looks like:

[default]   loglevel = info   beaker.session.cookie_expires = true   beaker.session.lock_dir = . beaker.session.type = mongodb   beaker.session.url = mongodb://mongo_host:mongo_port/beaker.sessions?slaveok=true   beaker.session.skip_pickle = true    [composite:main]   use = egg:paste#urlmap   /v1/cust1 = cust1    [app:cust1]   paste.app_factory = appservice.main:make_app   company = customer1   db_host = db_host   db_port = db_port   db_name = db_name   data_collection = customer_data   users_collection = customer_users   report_param_1 = report_param_1_data   report_param_2 = report_param_2_data   report_param_3 = report_param_3_data   report_param_4 = report_param_4_data   report_param_5 = report_param_5_data   report_param_6 = report_param_6_data    [server:main]   use = egg:paste#http     host = 0.0.0.0   port = %(app_port)s 

what causing issue? there problem in configuration?

i changed way processing configuration files use arguments passed app factory rather manually parsing file app. reason don't understand @ all, seems have solved problem. @mikhailov, time , help.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -