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

  • Home
  • SEARCH
  • 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 8696375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:15:47+00:00 2026-06-13T01:15:47+00:00

So, ive got a simple gearman system running right now, with a worker running.

  • 0

So, ive got a simple gearman system running right now, with a worker running.

The worker basically just takes the payload (a random number in this case, and is supposed to echo it back to the screen. Literally an echo, not returning to the client.

The client sends the random number. Im trying to do a $client->doBackground( 'post', 65482, md5(uniqid())); but its coming back with a 47 error (GEARMAN_TIMEOUT) every time.

getErrNo() returns 0, error() returns something about GEARMAN_TIMEOUT

However, when i change it to just $client->do(blah, blah, blah), it works just fine.

I’ve even occasionally seen it where the worker still echo’s the number, even after getting the timeout error…

public function execute()
    {
        $method = 'do';
        if( !$this->getBlock() )
        {
            $method .= ( $this->getPriority() == 'Normal' ? '' : $this->getPriority() ) . 'Background';
        }
        else
        {
            $method .= $this->getPriority();
        }
        echo "Method: $method \t Worker: {$this->getName()} \t Payload: {$this->getPayload()} \t Hash: {$this->getHash()}\n";
        $this->setResult(
            $this->getClient()
                ->$method(
                    $this->getName(),
                    $this->getPayload(),
                    $this->getHash()
                )
        );
        if( $this->getClient()->returnCode() != GEARMAN_SUCCESS )
        {
            echo "Code: " . $this->getClient()->returnCode() . "\t" . GEARMAN_TIMEOUT . "\n";
        }
    }

that echo comes back with

Method: doHighBackground Worker: leadposter Payload: 10930 Hash: 091878f5965e4a1de2992c607b3c562b240792a6

Heres the error info

["error":"Uecode\GearmanBundle\Gearman\Job":private]=>
  array(4) {
    ["attempts"]=>
    int(3)
    ["return_code"]=>
    int(47)
    ["error_no"]=>
    int(0)
    ["error"]=>
    string(103) "gearman_wait(GEARMAN_TIMEOUT) timeout reached, no servers were available -> libgearman/universal.cc:325"
  }
  • 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-13T01:15:48+00:00Added an answer on June 13, 2026 at 1:15 am

    Solved it.

    Connections werent persisting across methods… so, build a server pool, and connected to the servers just before running the job

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

Sidebar

Related Questions

I have a simple question. Ive got a trigger to insert the values into
so ive been tryind to create a simple array list class and got stuck
I've got simple java-based ppt->swf sub-project that basically works. The open source software out
I've got pretty simple code out here: NSArray* divisions = [[NSString stringWithFormat: @%d, system(ssh
Ive got a simple Model called Category. The model is has three fields :
This is probably a simple thing, but ive got the following code: <div> @using
Ive got a image cache system that im using to generate certain image sizes
Ok Ive got a simple flash file, since im trying to accomplish accessing a
I've got a simple example here. Basically a form which when submitted will reload
Ive got some in memory images in various simple formats, which I need to

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.