HI,
I use pyramid, uwsgi with nginx. Before this, I serve my static pdf
files using nginx. The files can be download fast. But now, because I
set the permission for the files to a directory called '/resources'
for a certain group of users by using add_static_view, my
understanding is the file will now be serve by uwsgi instead of
directly by nginx server. The '/static' directory will now only serve
js, css and template files.

The problem that I faced now is that, when users try to download the
pdf file now, the download process will stuck at certain time, and
sometimes, will stop prematurely. Even if the download complete, it
will take  a long time even when the file is small.

my nginx.conf and uwsgi parameter are as below. There should be
something wrong with my configurations. Can somebody bring some light
to solve my probs?

TQ.

----------------------------------------------------
#nginx.conf
user  user user;
worker_processes  2;

events {
    worker_connections  1024;
 }

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


    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    server {
            listen 80;
            server_name myweb.com;
            access_log /path/to/directory/file.log;
            error_log /path/to/log/debug/file.log debug;
            charset utf-8;
            root /path/to/my/app;
            #index  Home index.html index.htm;

        location /static  {
              root /path/to/my/app;
              expires max;
            }

        #for robot.txt and favicon
        location ~* \.(txt|ico)$ {
                root /path/to/my/app/static/directory;
                expires max;
            }

        location / {
            nclude     uwsgi_params;
            uwsgi_pass unix:/tmp/uwsgi.sock;
            #uwsgi_param SCRIPT_NAME /;
            }
    }

}

----------------------------------------------
my uwsgi parameter:
socket = /tmp/uwsgi.sock
home = /my/home/path
daemonize = /path/to/log/uwsgi.log

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to