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 8835393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:15:03+00:00 2026-06-14T09:15:03+00:00

We’re rolling out our first django application under mod_wsgi as `WSGIDaemonProcess our-appname processes=6 threads=15’`

  • 0

We’re rolling out our first django application under mod_wsgi as

`WSGIDaemonProcess our-appname processes=6 threads=15'`

and we’re having a discussion about whether our Python code and the Redis and Postgres libraries it uses needs to be thread-safe or not.

From what I can tell from reading the mod_wsgi documentation, even though the apache worker is processing requests with multiple apache threads, our python code is for all intents and purposes single-threaded. I don’t see any warnings on the mod_wsgi docs saying “Beware!! You now have to worry about Global Data and Thread Safety!” but there’s also no explicit “Don’t Worry About Threads There Aren’t Any”.

We’re not doing anything explicitly with threads in our python code, there is no mention of them in anything we’ve written.

But some people here are of the opinion that since we’re running with threads=15 that we are now in in the multi-threaded world.

Can anyone clarify what’s actually going on here? Is our Python code now subject to multiple threads of execution through the same data where it wasn’t before, or not?

  • 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-06-14T09:15:04+00:00Added an answer on June 14, 2026 at 9:15 am

    Yes obviously you are running multi-threaded app and it will create problems if you don’t take care with globals, Class attributes etc

    If you need to keep something globally, keep it in thread local storage.

    Here is a quote from modwsgi doc, Building_A_Portable_Application

    3 . An application must be re-entrant, or simply put, be able to be called concurrently by multiple threads at the same time. Data which
    needs to exist for the life of the request, would need to be stored as
    stack based data, thread local data, or cached in the WSGI application
    environment. Global variables within the actual application module
    cannot be used for this purpose.

    So I think you have been sufficiently warned.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I know there's a lot of other questions out there that deal with this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker

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.