Re: Threaded fastcgi-server - truncated output
"Vladimir V. Pavluk" <vladvic_r-JGs/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Hello! Playing with my code making it similar to the example I figured out that the problem appears when I'm setting the O_NONBLOCK flag on the socket which I listen to. Is it a bug, or it is a documented behaviour? Sincerely, Vladimir V.Pavluk. > Hello! > > I've wrote the threaded fastcgi application, which is generally works fine. > However, I've found a problem: when the size of output becomes more than > some threshold (in my case - about 8.7 kb), the rest output is truncated. > It seemed to me that the stream does not have time to be flushed before the > FCGX_Finish_r is called, because when I insert sleep(1) line, the problem > is gone. > I've found an example of threaded fastcgi server in dev kit distribution, > and found the 'sleep(2)' line just after output. > So, I have following questions: > Is this delay really needed for allowing streams to be flushed? > How can we do it without sleep delays (if it is possible at all) - I don't > really want to insert sleeps after output as it looks as a dirty hack :( > ?.. > > Sincerely, Vladimir V. Pavluk. > ___________________________________ > fastcgi-developers mailing list > http://fastcgi.com/fastcgi-developers/ ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/