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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:33:45+00:00 2026-06-05T05:33:45+00:00

I have a table in my MySQL database containing 200K records. Each record contains

  • 0

I have a table in my MySQL database containing 200K records. Each record contains a URL that should be processed in some way. The URL processing in my case is not a trivial task, so I have chosen to use the Gearman queue to run these as background jobs.

So, for the each record (URL) in my table I plan to create separate task and supply it to Gearman.

Also, the data in my table is not static and very often new URLs will be added there.

According to my business logic I need to continuously process this list of urls. When I have completed processing of the last record in my DB table I should move to the first one and process should be repeated for the all records again.

So my questions:

  • How to better supply tasks to Gearman in this case?
  • Should I use cron or is it possible to organize logic where Gearman will automatically pull tasks?
  • How many tasks can be submitted in one time to Gearman?

So, could you please tell me how best to implement this system?

  • 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-05T05:33:47+00:00Added an answer on June 5, 2026 at 5:33 am

    Sounds that what you need is a queue, where the processed items are added back to the bottom of the queue. I suggest to organize the workflow like this:

    1. Once a new URL appears in your system, add it to Gearman background job queue.

    2. In the Gearman worker implementation, once the job is processed, add it to the queue again.

    In this way, you will be constantly processing URLs in the order they were added to the queue and the whole queue will be infinitely reiterated. This assumes that you are repeatedly performing one task, of course.

    If there’s more than 1 task (e.g. first, do task #1 on all URLs, then do task #2, etc), you could follow a similar pattern, just send the jobs to the second queue (e.g. different worker) after the first task. Then, depending on how exactly the you want to order the work, you will either see everything happen automatically (if both workers are avaialable all the time) or you will need to monitor queue #1 and only start worker #2 when it is empty. For the details of such monitoring, see Any way to access Gearman administration?

    In general, Gearman could easily and quickly handle 200,000 items. Now, using a persistent queue will slow things down a bit (it’s essentially a MySQL / other DB connection), but should not do anything horrible. I have not tried it myself, but the success stories usually involve even more items and often a persistent queue, too.

    The only thing that you need to be aware of is that Gearman does not allow processing jobs in batches (e.g. 10 items concurrently). As you are processing URLs, it means you will need to process 1 URL at a time, which is costly, as you will need to wait for each of them to be downloaded separately. You can avoid it either by using event-driven / non-blocking programming language for processing or you can take a look at beanstalkd, which allows such batch processing.

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

Sidebar

Related Questions

I'm trying to normalize a mysql database.... I currently have a table that contains
My MysQL database contains multiple MyISAM tables, with each table containing millions of rows.
I have a mysql database that has 2 table. the first table contains the
I have table which contains double values stored in mysql database ...I need to
Greetings friends, In my MySQL database, I have 'MAB' table which contains information about
i have a large mysql database table in which one column contains values ranging
I have a MySQL database, and a particular table in that database will need
I have a MySQL database with a table containing a BINARY(16) column. When I
I have a MySQL database table containing information about places. I'm trying to fetch
I have a mysql database with table 'product' containing columns 'product_id', 'name', 'price' table

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.