+1 http://pypi.python.org/pypi/django-celery is a good solution for this kind of background task. It opens up a lot possibilities like django-celery-email for background email sending, etc. Keep your web contexts as short as possible.
For the AJAX server-side integration, check out: http://www.dajaxproject.com Brian Schott bfsch...@gmail.com On Jan 10, 2013, at 9:12 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Jan 10, 2013 at 1:21 PM, Mauro Sánchez <maur...@gmail.com> wrote: >> Hello, I have a process that takes about 2 or 3 minutes to execute. The >> problem is that sometimes (not always) it results in an Internal Server >> Error 500 because of the time it takes. >> Is there a way to configure Apache or mod_wsgi to prevent this? Let's say, >> that even if the process takes 10 or 15 minutes it just keeps running until >> it finish? >> Thanks a lot for the help. >> Cheers, >> Mauro. >> > > Providing a URL that consumes an entire web worker for >1 minute is a > good way to open yourself up for a DOS attack - even 10 seconds is too > long really. Put lengthy operations in to a queue - like django-celery > - so that you can manage how much of your resources that task > consumes, and poll for completion with AJAX. > > Cheers > > Tom > > -- > 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. > -- 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.