Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#34 StreamOut Error when client cancels transfer of non-servlet

WebKit (58)

For an easy to prove case, put a large file in a context somewhere
(say largefile.pdf).

Hit the url that represents that file with a
browser (http://localhost/WK/largefile.pdf) and cancel the
download before it's complete.

The console that spawned
the AppServer will fill with hundreds and hundreds of lines like

StreamOut Error: (10053, 'Software caused
connection abort')

I believe that it prints one line for each
"chunk" of data that it would otherwise have sent downstream.For
a large file, this ties up the thread (and eats a ton of RAM and CPU)
untill it has made one error for each chunk. This has hung servers for

The type of file is not relevant; I've done it with .html,
graphics, movies, zip, etc. Any non-servlet file seems to be

One could argue that one shouldn't serve large
files with WK, and that's a good point, but sometimes one might
have to, and I'm really only using this large file as an example (I
assume that it happens on small files, too... it's just harder to
interrupt the download quickly enough).

I tested this with
0.7 and with a (not so recent) cvs version, but I can't test it with
cutting edge because SF isn't letting me update from cvs right now
(durn SF to heck). I tested on Python 2.1 and 2.2 on windows 2000
and linux (debian woody). All exhibit the same behavior.

you need to know more about this bug, I'm on the list as



    • assigned_to: nobody --> stuartd
  • Logged In: YES

    This is very similar to the stream out closed error when
    flush() is called and you are in a server-push style servlet.

    A problem in that case was that servlets were not
    terminating when the flush() failed as a result of the
    client canceling the transfer, or going away. The servlet
    push would continue until it terminated for some other reason.

    I have this specific problem in my application. Look for a
    fix to come forward in the near future in CVS after the 0.8
    release. If you can't wait for a for a fix, e-mail me, and
    I'll see if I can help you out.

  • Logged In: YES

    Has probably been fixed meanwhile; I cannot reproduce this
    with Webware 0.9.1 (tested with a 32MB text file, Python 2.3
    on Linux with Apache/mod_webkit and Python 2.4 on Windwos,
    built-in Webserver).

    • status: open --> closed-works-for-me