No I'm not serving static file I have a very large json file
dinamycally generated (based on a db query)

On 5 Ago, 15:28, Mike Ramirez <gufym...@gmail.com> wrote:
> On Wednesday 05 August 2009 04:08:15 am drakkan wrote:
>
>
>
> > here is the excpetion returned while trying to serve a large file:
>
> > Traceback:
> > File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"
> > in get_response
> >   92.                 response = callback(request, *callback_args,
> > **callback_kwargs)
> > File "/usr/lib/python2.4/site-packages/django/contrib/auth/
> > decorators.py" in __call__
> >   78.             return self.view_func(request, *args, **kwargs)
> > File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in
> > _result_iter
> >   106.                 self._fill_cache()
> > File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in
> > _fill_cache
> >   692.                     self._result_cache.append(self._iter.next
> > ())
> > File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in
> > iterator
> >   243.                             only_load=only_load)
> > File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in
> > get_cached_row
> >   987.             obj = klass(*fields)
> > File "/usr/lib/python2.4/site-packages/django/db/models/base.py" in
> > __init__
> >   263.                 setattr(self, field.attname, val)
>
> > Exception Type: MemoryError at ....
> > Exception Value:
>
> > any way to solve the issue?
>
> > thanks
> > drakkan
>
> I assume you're using django to serve static files, this method isn't
> recommended, it is inefficient [1].  You'll want to serve static files
> through another method, such as a nginx server or follow the mod_python
> instructions on serving static files [2]. Personally, I find it is just
> better, even in development to follow this 'rule of thumb' and setup a vhost
> for serving media/static files through apache, bypassing django.
>
> [1]http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-...
>
> [2]http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serv...
>
> Mike
>
> --
> Overdrawn?  But I still have checks left!
>
>  signature.asc
> < 1KVisualizzaScarica
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to