Re: mod_perl memory

André Warnier <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Pavel Georgiev wrote:
...
> Let me make I'm understanding this right - I'm not using any buffers myself,
  all I do is sysread() from a unix socked and print(),
  its just that I need to print a large amount of data for each request.
> 
...
Taking the issue at the source : can you not arrange to sysread() and/or 
print() in smaller chunks ?
There exists something in HTTP named "chunked response encoding" 
(forgive me for not remembering the precise technical name).  It 
consists of sending the response to the browser without an overall 
Content-Length response header, but indicating that the response is 
chunked.  Then each "chunk" is sent with its own length, and the 
sequence ends with (if I remember correctly) a last chunk of size zero.
The browser receives each chunk in turn, and re-assembles them.
I have never had the problem myself, so I never looked deeply into it.
But it just seems to me that before going off in more complicated 
solutions, it might be worth investigating.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.