Ivan Sagalaev wrote: > I'm using well-known flup's FastCGI server. The app serves large files > (mp3 albums, 100 MB typically) that users download with download > managers that often drop connections on client side and start new ones. > The strange thing is that when a client drops connection flup's FastCGI > server seems to not notice it and keeps feeding output (somewhere?). > This results in two bad things form me: server overload because of many > working processes that work for nothing and my app thinking that the > download went OK and registering it for the user even if the download > went to nowhere. > Answering ror anyone who has similar problem.
I have contacted Allan Saddi, flup's author, and he has found the place where this is happening. It's in flup.server.fcgi_base.py around line 508: except socket.error, e: if e[0] == errno.EPIPE: return # Don't bother raising an exception. Just ignore. elif e[0] == errno.EAGAIN: select.select([], [sock], []) continue The code in the first condition suppresses the exception that happens when client quits. Removing this part makes an exception to break the output process which is what should happen. P.S. Looks like Allan considers this as a bug and is going to fix it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---