SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,097
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)

    Delayed jobs never go back to the 'reserved' state in beanstalkd

    This is not a question, but the solution to a problem I had with no (good) solution to be found on google -- so I'm just posting this in case anyone runs into the same problem

    In beanstalk 1.4.6 (which is the apt-get default version at this moment) on Ubuntu (and probably all Debian derivatives) when you put a job in the tube with a delay time it doesn't "come out" after the specified delay but rather stays there for ever and ever until you add a new delayed job to the job; in that case the job that was already there will go to 'reserved' and the new job will stay there for ever and ever.

    The solution is to remove beanstalkd with apt-get (1) and then reinstall beanstalkd 1.5.x from source. This version doesn't have this problem and works as intended.

    Code:
    cd /usr/local/src
    wget https://github.com/downloads/kr/beanstalkd/beanstalkd-1.5.tar.gz
    tar zxvf beanstalkd-1.5.tar.gz
    cd beanstalkd-1.5
    ./configure
    make
    sudo make install
    to verify where it was installed
    Code:
    which beanstalkd
    (most likely in /usr/bin/beanstalkd)

    Hope this helps anyone

    (1) If you want you can leave the default beanstalkd from Ubuntu installed and just change the /etc/init.d/beanstalkd file to point to the new executable so it will still boot at runtime (or write your own -- but this is simpler )
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Thanks ScallioXTX,

    I ran into this a while ago, and your solution is a good one.

    Regards,
    Steve
    ictus==""


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •