This website recently got a major rebuild; if you're missing something, let Lorna know.

    Tag: gearman


  1. PHP and Gearman: Unable to connect after upgrade


    I upgraded PHP and related pecl modules on my development machine today, and ran into a problem with Gearman. Actually I ran into more than one! Firstly the challenge of getting the newest pecl version working with a gearman version. Then an error where my existing PHP application couldn't connect to gearman after upgrade.

    Read more

  2. Watch Over Long Running Processes with Supervisord


    About a year ago, I wrote a bit about gearman and how I was using it to create points in my application where intensive tasks could be processed asynchronously. It occurred to me recently as I was working on something quite similar that I didn't come back and write about the tool I use to manage the workers; supervisord.

    Read more

  3. Gearman Priorities And Persistent Storage


    I have been writing a bit about Gearman lately, including installing it for PHP and Ubuntu, actually using it from PHP and also how I use persistent storage with Gearman. I'm moving on to look at adding jobs of different priorities.

    I use Gearman entirely as a point to introduce …

    Read more

  4. Using Persistent Storage with Gearman


    I'm using gearman for the first time in a new project, and two things in particular were bothering me. Firstly, there doesn't seem to be a built-in way to see what's in the queue. Secondly, if the gearman server dies (which seemed quite likely when I was first getting to grips with this stuff and writing really buggy code!) you lose your queue. Therefore I decided that I would switch gearman over to running with persistent storage.

    Read more

  5. Dealing with MySQL Gone Away in Zend Framework


    I wrote recently about having gearman in my application, however I have been seeing problems with the long-running PHP worker scripts. My logs had entries like this:

    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
    

    The worker is a Zend Framework application, run from the CLI, and it …

    Read more

  6. Using Gearman from PHP


    I've introduced Gearman into a project I'm working on, and since a few people have asked I thought I'd share my experiences. Basically, this application generates some PDFs from a variety of data sources, makes images, and emails it. Since the whole data processing, image handling, PDF generation process is fairly heavy, I'm putting the requests to generate these onto a gearman queue and having some workers process the jobs. The eventual aim is to bring up EC2 instances (or php-specific cloud hosting perhaps? Recommendations gratefully received!) to do this work but right now I have one worker and it's all on one server.

    Read more

  7. Installing Gearman for PHP and Ubuntu


    I've been using Gearman lately in a project that I'm working on, and of course a month later when I came to deploy the code, I had to look up all over again what was required for a gearman server in order to put it on the new platform. Here is the short version for my future reference (and yours, if you like)

    Read more