Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client seems to only connect to first server #63

Open
steevhise opened this issue Jul 1, 2022 · 1 comment
Open

client seems to only connect to first server #63

steevhise opened this issue Jul 1, 2022 · 1 comment

Comments

@steevhise
Copy link

we have a herd of 3 gearman servers that our nodejs web app connects to as client, using the array of host:port strings form. It seems that it's only connecting to the first one, though there's no errors. if i change the order of the servers, I see all the jobs get put on whichever one is first. Is that a known bug?

return connect({
            servers: this.servers,
            defaultEncoding: 'utf8',
            submitTimeout: 3000,
            connectTimeout: 5000,
            debug: this.devMode })
            .then((client) => {

                client.on('connect',(...args) => Debug('gearman-client-connected', [...args].toString().slice(0,200)));
                client.on('disconnect',(...args) => Debug('gearman-client-disconnected', [...args].toString().slice(0,200)));
                client.on('connection-error', (...args) => Debug('gearman-client-error', ...args));
                client.on('error', (...args) => Debug('gearman-error', ...args));
                this.client = client;
            })
            .catch((err) => {

                err.message = 'Gearman: ' + err.message;
                Debug('Gearman connect error: ', err);
                throw err;
            }); 
@steevhise
Copy link
Author

Is this project being maintained any more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant