sending data in "chunks"

Adrian Perez de Castro adrianperez at
Mon Sep 17 00:35:42 MSD 2007

El Sun, 16 Sep 2007 22:14:14 +0400
Igor Sysoev <is at> escribió:

> On Sun, Sep 16, 2007 at 08:08:09PM +0200, Manlio Perillo wrote:
> > Igor Sysoev ha scritto:
> > >On Sun, Sep 16, 2007 at 07:36:49PM +0200, Manlio Perillo wrote:
> > >
> > >>I need to send to the client some data in chunks. [...]
> > Ok, thanks.
> >
> > [...]
> >
> > I have also found the real problem: one of the call to 
> > ngx_http_output_filter fails with a return value -2.
> > 
> > Now I have to found the problem...
> If you have got all your data ready you may send them at once in one
> chain. But if you are getting then gradually, then after NGX_AGAIN
> you should set event handlers and timer and return control to nginx.

Mmmh, this affects me as well in the fancyindex module. When doing
subrequests for header inclusion the call to ngx_http_output_filter
returns NGX_AGAIN. I have just assumed NGX_AGAIN does not need extra
work, and the rest of the data I send goes to the client...

So I suppose I am making the worker process block too much, isn't it?

I can only send all data in one chain when not using header/footer
(they are subrequests), so I think it will be better to fix my code :D


Adrian Perez de Castro               <adrianperez at>
Oficina de Software Libre
Universidade da Coruña        
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <>

More information about the nginx mailing list