-
Notifications
You must be signed in to change notification settings - Fork 74
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
Question: dealing with consumers #133
Comments
I can elaborate a little bit on this, since I had to deal with the same problems in my own custom deployment scripts. What we currently do with Magento 2.3.2 is reading those Magento 2.3.3 will change this a bit, and comes with a fix where they are no longer using the PID files in the var directory but use some kind of locking (probably using the database) to avoid spawning new consumers when the old ones are still running: magento/magento2@1d9e07b. In my opinion, we should still kill/restart these after a deploy, because consumers will still use old code loaded in memory, which is not ideal. But in Magento 2.3.3 we can no longer use the Then some day in a future release of Magento, running consumer processes will be able to stop themselves (not always immediately) by executing some new |
That's really useful @hostep thanks for that. I'll have a look into this, there may be a way to do a killall on the consumers then. |
Hi @valguss Played a bit with this today in preparation for Magento 2.3.3, this seems to work in our case:
Of course with a bunch of extra error handling here and there. Not sure if this is the best way to do this and if |
We're having the same issue on a couple of projects. Thanks for sharing your knowledge @hostep |
Thanks for sharing your knowledge @hostep! I've done similar on a 2.3.3 staging environment I just spun up. Likely going to do similar on a relatively large scale 2.2.x -> 2.3.3 upgrade project I've got starting here soon where this is currently and will continue to be the deployment tool of choice. I put the following bit into
This is running on a CentOS 7 system where deploy is running as
Example output from a deployment looks like this:
|
Sorry, this has been in my backlog to check for ages. @davidalger, your snippet appears to work great and will be adding to my builds Thanks for discussion around this |
- Initial commit with code fragment from davidalger/capistrano-magento2#133
Is it really necessary to pipe the |
It's necessary if you want to see the list of processes that were terminated in the deploy output (see my previous comment for an example). The |
Thank you for the explanation, @davidalger. I think it's something weird with this particular host, as |
Hi @davidalger
I've got a question about dealing with consumers that are started up using the magento cron. Currently, for each deployment a new set of coinsumers is started up but the old ones are not removed as the the PID in the var directory is valid for both (not linked in shared). How might we be able to deal with them so that the old consumers are killed off in favour of the new ones?
Thanks
The text was updated successfully, but these errors were encountered: