Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6225475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:50:58+00:00 2026-05-24T08:50:58+00:00

The workflow I am dealing with (user-wise) looks like this: User submits information and

  • 0

The workflow I am dealing with (user-wise) looks like this:

  • User submits information and files with a form
  • Form is saved
  • Additional post-save processing is done

This is fine, but the post-save processing takes quite a while, so I’m looking to do it in the background and issue an HttpResponseRedirect to a message informing the user that processing is happening and to please return later. Unfortunately, this doesn’t seem to be working; what I’ve got at the moment is this:

    if form.is_valid():
        p = multiprocessing.Process(target=form.save)
        p.start()
        return HttpResponseRedirect('/running')

But the error that I get back is this:

IOError at /content/script/new/
sys.stdout access restricted by mod_wsgi
...
/usr/lib/python2.6/multiprocessing/forking.py in __init__
    # We define a Popen class similar to the one from subprocess, but
    # whose constructor takes a process object as its argument.
    #
    class Popen(object):
        def __init__(self, process_obj):
    >>>>        sys.stdout.flush() ...
            sys.stderr.flush()
            self.returncode = None
            self.pid = os.fork()
            if self.pid == 0:
                if 'random' in sys.modules:
▼ Local vars
Variable    Value
process_obj 
<Process(Process-1, initial)>
self    
<multiprocessing.forking.Popen object at 0xb8a06dec>

Does python have a more magical way to do this? Does Django? If not, how can I go ahead and use multiprocessing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:50:58+00:00Added an answer on May 24, 2026 at 8:50 am

    Use celery.

    The mod_wsgi environment can multi-threaded — depending on your configuration. You do not want to interfere with how Apache, mod_wsgi, and Django are already using threads and processes to manage web server throughput.

    You have to assume that your Django operation is a single thread and cannot do anything except respond to Apache as quickly as possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The basic workflow of my Drupal site is this: User submits article via the
The workflow is like this: I receive a scan of a coupon with data
I am using this workflow: http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html where he mentions: First, and while in your
After a workflow has completed, I would like to be able to review a
My day to day work flow is something like this: acquire raw data (~50GB)
I have a custom workflow that uses the Collect data from a user action,
I am wondering what the best workflow would be to handle this process. Basic
This workflow is a xamlx file in an asp.net application. I have a CodeActivity
In Workflow for reading and writing files the authors use these two lines of
I've got some Workflow Foundation 4 ActivityDesigners that I'd like to have interact with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.