On 13 May 2010 02:18, btimby <[email protected]> wrote:
> I think perhaps my best solution to this problem is to simply use the
> X-Accel-Redirect header and allow nginx to serve my files for me. I
> know that it is capable of serving a file of any size (at least up to
> 8GB that I tested).
>
> That will bypass mod_wsgi and apache allowing nginx to take care of
> serving the static data. This should solve my problem as well as
> perform better.
>
> Comments?

Using X-Accel-Redirect certainly is a better way regardless, but I
don't know of any issues with daemon mode being able to serve up such
a large file.

Are you using wsgi.file_wrapper to optimise serving the file, or using
your own mechanism for streaming.

EIther way it probably doesn't matter if you use wsgi.file_wrapper or
not as it isn't the daemon process which is failing. That you get the
error that cant write data suggests the Apache server child process
which is proxying the request to the daemon mode process has likely
exited, failed in some way, or the client connection has closed which
has result in connection to daemon process being forcibly closed as
well.

Can you actually reliably reproduce this issue?

Graham

> On May 12, 10:33 am, btimby <[email protected]> wrote:
>> I am streaming a file from my mod_wsgi application to a client. At
>> just over 1GB (1028MB), the file send is aborted. The only error I can
>> find in my logs is:
>>
>> --
>> mod_wsgi (pid=18194): Exception occurred processing WSGI script '/path/
>> to/my/script.wsgi'.
>> IOError: failed to write data
>> --
>>
>> I am running mod_wsgi in daemon mode under apache. This worked fine
>> under mod_python. I am using nginx as a reverse proxy.
>>
>> Any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to