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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:37:44+00:00 2026-06-18T01:37:44+00:00

I have a working Python script that checks the 6,300 or so sites we

  • 0

I have a working Python script that checks the 6,300 or so sites we have to ensure they are up by sending an HTTP request to each and measuring the response. Currently the script takes about 40 min to run completely, I was interested in possibly some other ways to speed up the script, two thoughts were either threading or multiple running instances.

This is the order of execution now:

  1. MySQL query to get all of the active domains to scan (6,300 give or take)
  2. Iterate through each domain and using urllib send an HTTP request to each
  3. If the site doesn’t return ‘200’ then log the results
  4. repeat until complete

This seems like it could possibly be sped up significantly with threading but I am not quite sure how that process flow would look since I am not familiar with threading.

If someone could offer a sample high-level process flow and any other pointers for working with threading or offer any other insights on how to improve the script in general it would be appreciated.

  • 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-18T01:37:45+00:00Added an answer on June 18, 2026 at 1:37 am

    The flow would look something like this:

    1. Create a domain Queue
    2. Create a result Queue
    3. MySQL query to get all of the active domains to scan
    4. Put the domains in the domain Queue
    5. Spawn a pool of worker threads
    6. Run the threads
    7. Each worker will get a domain from the domain Queue, send a request and put the result in the result Queue
    8. Wait for the threads to finish
    9. Get everything from the result Queue and log it

    You’ll probably want to tune the number of threads, thus the pool, and not just 6300 threads for every domain.

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

Sidebar

Related Questions

I have a working Python script that executes an external command and calls Popen.communicate()
I have a python script that I cobbled together that checks my gmail via
I am currently working with Python and have been confused over the fact that
I need to have an at-home project now that I'm working on Python/Django at
I have a python program that I am currently working on which is working
I am working with datetime objects in python. I have a function that takes
I am working on a Python script that access Github using basic authentication. I
Am working on a command line python script - throughout the script, I have
I have a working python script which retrieves data from a sqlite3 db. I
I have a usb midi controller (uc-33e) and I have a working python script

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.