[uWSGI] uwsgi.chunked_read() - IOErrors

Sean DiZazzo sean.dizazzo at gmail.com
Mon Nov 6 20:07:40 UTC 2017


Thanks, Roberto!

>>This generally means the user has closed the connection, adding
ignore-write-errors should disable the reporting.

I'll add that option and give it a try.  Hopefully all of the data still
makes it through though.  We need every last bit.  :)

>>This is pretty strange, how uWSGI is connected to nginx ? (unix or tcp
sockets ?)

I'm using tcp via *http-socket* option.   I came in to this project new to
uwsgi, and spent a bunch of time fighting to get chunked transfer encoding
to stream through nginx to uwsgi and flask.  I ended up at a working
solution and have been afraid to mess with it.

Last I tried, the uwsgi_request_buffering was not working as expected, so I
had to go with the proxy method.  I'll spend some time again trying to
migrate it to using the uwsgi protocol over a socket.

Do you think that will give me the increase in upload speeds that I'm
missing?




On Mon, Nov 6, 2017 at 10:16 AM, Roberto De Ioris <roberto at unbit.it> wrote:

>
> > Hi,
> >
> > I’m having regular errors when using uWSGI’s uwsgi.chunked_read().  I am
> > streaming the data through nginx to uWSGI using chunked
> transfer-encoding,
> > then grabbing it in my flask app using chunked_read().
> >
> > It works perfectly most of the time, but sometimes I get the above
> > mentioned error.  I’ve tried all kinds of things to eliminate the error
> > but
> > nothing I do will get rid of it.  I’ve tried adjusting the timeout,
> > retrying the chunked_read in a loop with a wait, messing with any config
> > option I can image, tuning the chunks buffer, recompiling uWSGI with
> > different options, etc.
> >
> > Is this a known bug?  Or is it something that I’m missing?  Any help
> > pointing me towards a solution would be greatly appreciated.
>
> This generally means the user has closed the connection, adding
> ignore-write-errors should disable the reporting.
>
>
> >
> > Also, it seems like uwsgi reading from that stream is somehow limiting
> the
> > rate of the upload.  The data coming into NGINX will go at 50-80MB/sec,
> > but
> > I can't get UWSGI to go much above 30.   Even when I'm just reading the
> > data from the stream and throwing it out.
> >
> > Thanks in advance!!!
> >
> >
>
> This is pretty strange, how uWSGI is connected to nginx ? (unix or tcp
> sockets ?)
>
> --
> Roberto De Ioris
> http://unbit.com
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20171106/b32fcd99/attachment.html>


More information about the uWSGI mailing list