veny / GearmaNode

Node.js library for the Gearman distributed job system with support for multiple servers
Apache License 2.0
101 stars 35 forks source link

Worker does not get jobs if job payload in size ~65480-65510 bytes #55

Open dycode opened 7 years ago

dycode commented 7 years ago

When payload size is around 65480-65510 bytes worker does not get jobs from gearman. Example:

var gearmanode = require('gearmanode');
var client = gearmanode.client({ port: 4730 });

var x = '';
for (var i = 0; i < 65700; i++) {
    x += 'a';

    if (x.length > 65480)
        client.submitJob('testsLength', x, { background: true, unique: x.length });
}

var worker = gearmanode.worker({ port: 4730 });

worker.addFunction('testsLength', (job) => {
    console.log('Length: ' + job.payload.toString().length);
    job.workComplete('completed');
});

After running this code, you will see that not all jobs are completed. My tests shows that only jobs with sizes in ~65480-65510 are not received to worker. I can reproduce this in several computers.

veny commented 7 years ago
martynas19942 commented 7 years ago

I have this problem too, please fix it. Maybe some one have quick solution?

donatas-dycode commented 7 years ago

@veny I can also reproduce it and have the same issue. Maybe some fix commming up soon?

AndrejLukasevic commented 7 years ago

Same here.

paulius-zubavicius commented 7 years ago

Hi, it seems I got the same. Workarounds it is not a solution :( How long it could take? Please help