Hi Robert,

Unfortunately, the post-buffering option didn't work. I tried both
4096 and 1 and both times I just got the WSOD (white screen of death).
--pep3333-input is the only thing that seems to work.

For the record, I'm using uwsgi v1.0.2.1 so I'm not sure why it *does*
actually work, given what you said previously about pep3333-input
being a noop.

Kind regards,
Guy

> Message: 2
> Date: Mon, 30 Jan 2012 20:07:43 +0100 (CET)
> From: "Roberto De Ioris" <[email protected]>
> To: "uWSGI developers and users list" <[email protected]>
> Subject: Re: [uWSGI] Odd Django app 503 behaviour
> Message-ID:
>        <[email protected]>
> Content-Type: text/plain;charset=iso-8859-1
>
>
>> Hi Robert,
>>
>> Finally, I've solved the issue. Unfortunately, neither of the options
>> you mentioned were set in my nginx config. Here's what I have set for
>> the uWSGI settings:
>>
>> uwsgi_pass unix:///tmp/example.sock;
>> uwsgi_param HTTP_X_REAL_IP $http_x_forwarded_for;
>> uwsgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
>> include uwsgi_params;
>>
>> I tried explicitly disabling uwsgi_intercept_errors and tried a few
>> different options for uwsgi_next_upstream (incluidng 'off') but
>> nothing changed.
>>
>> There are no redirects or rewrites in the Nginx config and I removed
>> all timeout settings. However, I did a test and accessed the app via
>> the standalone method (outside Facebook, direct to the Nginx/uWSGI
>> server) and as I said before, it returns correctly. However, this
>> request is a GET request, whereas the Facebook request is a POST
>> request. I went back and had a look at this page:
>> http://forum.nginx.org/read.php?2,196581 again and I'm pretty sure the
>> issue detailed in this post is the cause of my problem. I tried adding
>> the --pep333-input directive to the uWSGI Upstart script for my app,
>> and lo and behold, it worked! The annoying thing is that I tried that
>> previously when I first came across that Nginx forum post about the
>> POST < 4096 bytes issue and it didn't work, but I must have not
>> restart the server properly or something like that.
>>
>> In any case, the problem is solved now but I thought I'd detail my
>> troubleshooting in case it helps anyone down the road. Thanks again
>> for your fast responses to my questions!
>>
>> Kind regards,
>> Guy
>>
>>
>>
>
> Pay attention as pep3333-input is a noop starting from 0.9.8.
>
> To solve the specific issue you only need to use post-buffering to force a
> full read of the body. On some blog-post/article you will see people using
> post-buffering = 1. This is (and was) overkill, starting from 0.9.9 this
> is not needed as post-buffering will always run, with the only difference
> in post-buffering arg being the maxium bytes to retain in memory instead
> of disk.
>
> --post-buffering 4096 should be a good comprimise
>
> --
> Roberto De Ioris
> http://unbit.it
>
>
> ------------------------------
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to