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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:33:30+00:00 2026-05-29T22:33:30+00:00

I have a Django management command that makes thousands of TCP/UDP requests. I’ve used

  • 0

I have a Django management command that makes thousands of TCP/UDP requests. I’ve used Gevent to speed this up as I’ve restructured my code to work as coroutines. The socket connections no longer block but from what I’ve read, parts of Django still aren’t green. (By green, I mean using greenlets.)

Could you tell me what parts of Django aren’t green and what I can do to make them green? There are some DB related parts that still block I think. Are there any libraries/patches for Django that help me make it green?

I’m not too concerned about the request/response cycle being green or not therefore, would Gunicorn help me?

Thanks

  • 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-29T22:33:31+00:00Added an answer on May 29, 2026 at 10:33 pm

    The gevent monkey patcher will patch the standard library to be Greenlet friendly. This should take of a lot of common Django calls.

    from gevent import monkey; monkey.patch_all()
    

    As far as databases, normally the interfaces are blocking. If you use PostgreSQL look into psyco_gevent to monkey patch psycopg2 to cooperate with gevent.

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

Sidebar

Related Questions

I have a Django management command, launched via supervisord, that uses tweepy to consume
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
I have a working django-admin custom command that I use to populate my database
I have just spotted that something is wrong with my django-admin.py command. I checked
I have an application that makes use of Django's UserProfile to extend the built-in
i have a django project with a long running (~3hour) management command in my
I have an management command from django.db import connection from django.core.management.base import BaseCommand class
I have a few management commands for my Django poject that is run automatically
I have a Django 1.3 application. I have several management commands. I want each
I am trying to run a Django management command from cron. I am using

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.