Skip to content

No payload might mean no job executed #2

@tamoyal

Description

@tamoyal

I found a situation where jobs time out if there is no payload. So executing this:

task = Gearman::Task.new("function_name", {a: "hi"}.to_json)

(with all the other boilerplate stuff to send and get result) works but this

task = Gearman::Task.new("function_name")

does not. This is for a foreground job and I have not tested on background jobs.

Also worth noting that the failure does not occur all the time. I have a job that executes every 15 minutes and very occasionally (once/week) it just "loses" it's connection to the Gearman server permanently. The client code is very simple (essentially does the aforementioned task of hitting a function with no payload). When the "connection loss" happens I usually hop in and restart the worker which solves everything but in this instance I wanted to debug the issue so I did not restart the worker and started tailing the server, client, worker logs and checked connections, etc.

Above is what I found and seems pretty conclusive. Sending no payload in some instances caused the job to not go through. Sending a payload always gets the job through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions