1

I have a problem with Gearman 0.32 (ppa:gearman-developers/ppa)- it doesn't save queue in Postgres for queue persistence.

  • Gearman is running, I can add jobs (example with DEBUG verbosity on pastebin for better readability: http://pastebin.com/3uRds4yi )
  • Postgres connection string is OK - I managed to login/access db using same data from same host
  • Gearman connects to Postgres - if queue table doesn't exist in DB it creates it.

And despite all that NOTHING is added to DB. I have 0 workers registered and as I add new jobs to queue they get queued, but never saved in persistent storage.

c2h5oh
  • 1,489
  • 10
  • 13

1 Answers1

1

Found the problem:

When using Pecl Gearman extension tasks added using GearmanClient::addTask (and high/low priority variants of the function) will be added to Gearman job queue, but not saved to database if PHP script times out before GearmanClient::runTasks returns result.

Use GearmanClient::addTaskBackground instead.

c2h5oh
  • 1,489
  • 10
  • 13