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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:34:24+00:00 2026-06-08T06:34:24+00:00

I am currently looking at replacing our home brew batch processor with Gearman. It

  • 0

I am currently looking at replacing our home brew batch processor with Gearman. It runs reports that can take up to several hundred megs of memory (PHP). As such, if too many of these reports are run the server will lock. I’ve had to add in logic to prevent the controlling process from spawning to many workers if memory is low and overloading our server and letting it crash.

If I switch over to Gearman is there some type of logic in place to prevent additional workers if system memory gets low? I see an option to limit workers, but this does not directly solve the issue. Additionally is it smart enough to balance the work load between systems if one system becomes overwhelmed?

What recommendations do others have out there? Is it possible for me to insert my own checks into Gearman to spawn workers when the conditions are right? Or what other solutions are there?

Developing on a LAMP stack and I’m not very familiar with Gearman, so rebuke where needed.

  • 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-08T06:34:25+00:00Added an answer on June 8, 2026 at 6:34 am

    Limiting the number of workers is the way to go – if you’re expecting reports to use 3-400 MB of memory, limit the number of workers to somewhere around / 400MB.

    You’ll not be able to extend Gearman itself to spawn workers if your memory usage is lower than expected, but you could create a wrapper that handles your workers and does that for you. Before you go that route take a look at extending GearmanManager to handle such issues. My suggestion is however to just let it be, and instead adjust the number of workers after you get some experience with exactly what kind of loads you’re expecting (both in how fast the requests for reports come in, the size of the reports memory wise and how fast you’ll need a response to the user requesting the report).

    Gearman will automagically load balance to the most responsive server – when a task arrives to gearmand, it’ll poll all the available workers and tell them a new task has arrived, and the client that first responds will get the task. This means that if a server has a load, it’ll respond slower to the request and the task will usually end up at the server with more available processing power (ignoring variance in network delays). This will also handle differently sized servers automagically.

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

Sidebar

Related Questions

I'm currently looking into automating a flex build so that we can get it
I'm currently looking into replacing our very proprietary build environment with Maven. The current
I am currently looking into a couple of possibilities for a microsite that I
I'm currently looking at a hefty Rails test suite. It's nothing I can get
I'm looking into replacing a bunch of Python ETL scripts that perform a nightly
I have been looking round for an open-source CMS framework that I can use
We are currently embarking on replacing the ADO.NET stack in our C# application with
I am looking to remover the circle bullet list style that is currently applied
I currently have a Python 2.6 piece of code that runs two loops simultaneously.
Currently looking into learn new technology and silverlight is on the potential list. However,

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.