-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http auth with nginx and uwsgi #29
Comments
And also a lot of this errors in nginx: 2015/10/30 04:29:20 [error] 4021#0: *129 readv() failed (104: Connection reset by peer) while reading upstream, client: 203.100.xx.xx, server: xxx.net, request: "POST /create_invitation HTTP/1.1", upstream: "uwsgi://127.0.0.1:3031" |
Are there any errors, crashes or stack traces printed by the Flask process? |
No. nothing. Flask is normal. Uwsgi is normal too. I can see flask return a 401 to client from uwsgi log. If request is GET, it's ok. |
I think I found the issue. We are using Alomofire to send http request. And there is no header "connection:keep-alive". After we add this header, it works now. |
Recently I use flask + uwsgi + nginx to make a server and I use Flask-HTTPAuth
to do the digest auth in flask.
Most ot time it works fine but when I do a large post (let's say 3M) then I got 502 error in browser.
nginx error:
[error] 3438#0: *16 sendfile() failed (32: Broken pipe) while sending request to upstream, client: 203.100.xx.xx, server: xxxx.net, request: "POST /create_invitation HTTP/1.1", upstream: "uwsgi://unix:/xxxxr/uwsgi.sock:
I search a lot on google to solve it but didn't success until I close the http auth.
And it works well now. So should I move http auth from flask to nginx ?
I guess flask-httpauth close the connection after it sends 401 ? So nginx got error ?
thanks
The text was updated successfully, but these errors were encountered: