So what you are encountering is limitations in the socket buffer size enforced by the operating system, in combination with Apache httpd applying a socket timeout.
In other words what happens is that the HTTP client isn't reading data and so the operating system level socket buffer fills up. At that point the Apache httpd write of the response data blocks with it eventually timing out, causing the initial error you see. In that situation Apache httpd will close down the connection, which results in you seeing the second error when still trying to write out more data anyway.
You may be able to adjust some Apache configuration settings to try and solve this, but it would affect all requests in the context which you apply the configuration (dependent on whether done in server, VirtualHost, Directory or Location contexts). So not something you could selectively do on a per client basis.
The first Apache directive to look at is SendBufferSize.
If this is not set it should default to 0, which means it uses the operating system default.
So you might be able to fiddle with this by setting it larger than the operating system default (although there is still some upper bound set by operating system you can go to).
The next Apache directive to look at is Timeout.
This would usually default to 60 seconds but some Linux distributions may override this in the Apache configuration they ship.
In very old Apache versions this actually defaulted to 300 seconds, but it was made lower at some point.
If playing with these, do be careful since they cause increased memory usage or cause other undesirable effects depending on traffic profile your server gets.
One other thing you may be able to use is mod_ratelimit.
I have never actually used this and not exactly sure how it works, so is a bit of a guess, but you may be able to use this to slow down how quickly your application outputs the data.
I am assuming here that this module will introduce waits into your application, by blocking your writes for a bit, to keep the flow of data being written by it under the rate limit. This would have the effect of not stuffing so much data into the response pipeline such that things work better with slower clients. Obviously using it would though penalise faster clients but you might find an acceptable balance by setting a higher rate limit for the initial burst of data and then using a lower rate after that.
Graham