That's why you run out of buffer/swap space. LSWS caches the whole response body produced by PHP, so all download files will be stored in the buffer/swap.
You should have your developer to remove the streaming code and replace it with a internal redirect I mentioned earlier. Your site will be flying after that. The large upload might not be a problem any more.