You are trying to serve a 299mb file, directly from your webapp instance?
I'm just gonna come right out and say it... what you are doing is pretty stupid. I'd look into doing things properly (i.e. serving it from a real web server) rather than trying to resolve this problem.
PS) The reason you are getting a MemoryError, is because your webapp instance is trying to buffer up 299MB of data to send to the client. Not cool.
On Wed, Apr 27, 2011 at 7:34 PM, Elton Pereira <eltonplima@gmail.com> wrote:
299MiBOn Wed, Apr 27, 2011 at 11:31 AM, Cal Leeming [Simplicity Media Ltd] <cal.leeming@simplicitymedialtd.co.uk> wrote:
... dare I ask, how big is the file?CalOn Wed, Apr 27, 2011 at 3:20 PM, Elton Pereira <eltonplima@gmail.com> wrote:
When attempting to download a zip file the following error is raised:
192.168.1.39 - - [27/Apr/2011 11:12:35] "GET /media/downloads/betha/
essencial/sybase9/windows32/win32.rar HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/
basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
wsgi.py", line 252, in __call__
response = middleware_method(request, response)
File "/usr/local/lib/python2.6/dist-packages/django/middleware/
gzip.py", line 35, in process_response
response.content = compress_string(response.content)
File "/usr/local/lib/python2.6/dist-packages/django/utils/text.py",
line 183, in compress_string
zfile.write(s)
File "/usr/lib/python2.6/gzip.py", line 197, in write
self.fileobj.write( self.compress.compress(data) )
MemoryError
NOTE: any other file I can download normally, the error only happens
with RAR files.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Elton Pereira de Lima
Linux System Administrator
Django Developer
---------------------------------------------
Seja transparente! Use Software Livre!
Atenção: Este e-mail pode conter anexos no formato ODF (Open Document
Format)/ABNT (extensões odt, ods, odp, odb, odg). Antes de pedir os
anexos em outro formato, você pode instalar gratuita e livremente o
BrOffice (http://www.broffice.org) ou o seguinte Plugin para Microsoft
Office (http://www.sun.com/software/star/odf_plugin/get.jsp).Você que paga propina, joga lixo no chão, fura fila, sonega impostos, estaciona em vagas p/ deficientes... NÃO PODE FALAR MAL DOS POLÍTICOS!
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment