satchmo +nginx+fcgi

Issue #913 invalid
kmamike
created an issue

Hello. I try to start my Satchmo shop server in prefork mode on nginx+fcgi. nginx.conf: {{{ server { listen 0.0.0.0:80; server_name example.test www.example.test;

    error_log /var/log/customers/httpd/example_test/example.test/error.log;
    access_log /var/log/customers/httpd/example_test/example.test/access.log main;

    #proxy_buffering on;
    location / {
          root   html;
          index  index.html index.htm;
          fastcgi_pass 127.0.0.1:8882;
          fastcgi_param PATH_INFO $fastcgi_script_name;
          fastcgi_param REQUEST_METHOD $request_method;
          fastcgi_param QUERY_STRING $query_string;
          fastcgi_param CONTENT_TYPE $content_type;
          fastcgi_param CONTENT_LENGTH $content_length;
          fastcgi_param REMOTE_ADDR $remote_addr;
          fastcgi_param REMOTE_PORT $remote_port;
          fastcgi_param SERVER_PORT $server_port;
          fastcgi_param SERVER_NAME $server_name;
          fastcgi_param SERVER_PROTOCOL $server_protocol;
          fastcgi_pass_header Authorization;
          fastcgi_intercept_errors off;
    }

}

}}} satchmo start as: {{{ ./manage.py runfcgi method=prefork daemonize=false host=127.0.0.1 port=8882 }}} after run I can see in nginx log: {{{ File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/flup/server/fcgi_base.py", line 1112, in handler result = self.application(environ, start_response) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/core/handlers/wsgi.py", line 239, in call response = self.get_response(request) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/core/handlers/base.py", line 67, in get_response response = middleware_method(request) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/middleware/locale.py", line 16, in process_request language = translation.get_language_from_request(request) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/utils/translation/init.py", line 97, in get_language_from_request return real_get_language_from_request(request) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/utils/translation/trans_real.py", line 353, in get_language_from_request lang_code = request.session.get('django_language', None) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/contrib/sessions/backends/base.py", line 63, in get return self._session.get(key, default) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/contrib/sessions/backends/base.py", line 172, in _get_session self._session_cache = self.load() File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/contrib/sessions/backends/db.py", line 16, in load expire_dategt=datetime.datetime.now() File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/manager.py", line 93, in get return self.get_query_set().get(args, *kwargs) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/query.py", line 304, in get num = len(clone) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/query.py", line 160, in len__ self._result_cache = list(self.iterator()) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/query.py", line 275, in iterator for row in self.query.results_iter(): File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/sql/query.py", line 206, in results_iter for rows in self.execute_sql(MULTI): File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/models/sql/query.py", line 1734, in execute_sql cursor.execute(sql, params) File "/var/www/vhosts/server_name/python/lib64/python2.5/site-packages/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) OperationalError: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. }}} when I try to start "Hello would" project - all works properly.

How I can correnct it? There can be I have forgotten something to install or to set up any customization? Please help me...

Comments (2)

  1. Chris Moffitt repo owner

    Please post this on the satchmo user's list. This is a configuration issue with your setup, not necessarily a satchmo issue. We will see if we can help you on the user's list.

  2. Log in to comment