Skip to content

v1.4.0

Compare
Choose a tag to compare
@BentiGorlich BentiGorlich released this 27 Feb 17:01
· 646 commits to main since this release
eeaf4e4

Hi everybody this is our v1.4.0 release bringing big changes to the messenger queue layout, our background worker system. And because of that the update process is a little more complicated than usually. For a little more info you can check out our FAQ#messenger-queue-is-building-up-even-though-my-messengers-are-idling and our Admin Guide#symfony-messenger-queues

Comparison to previous version: v1.3.0

DB migrations New ENV vars Admin guide changes Suggest cache clearing
☑️ ☑️ ☑️

Upgrade Instructions

For Docker

We removed one of the containers in the docker compose, because we do not have separate workers for the different queues anymore. That means that the default is only one work process on the messenger queue.
If you need more than that, you can

  • copy & paste the messenger part of the docker/compose.yml and give them unique container names or
  • use the docker compose replicas option instead: comment out container_name for messenger service and this block and just change amount of replica you need
services:
  messenger:
    deploy:
      mode: replicated
      replicas: <number of replicas here>
  1. Get the new docker image by either checking out the new code and building the image or pull the published image
  2. Stop the containers and remove the messenger containers: docker compose down && docker compose rm
  3. Start the containers docker compose up -d

For Bare Metal

  1. Stop all supervisor messenger processes: supervisorctl stop messenger-ap:* messenger-kbin:*
  2. Remove the all process groups supervisorctl remove messenger-ap messenger-kbin
  3. Edit the messenger config at /etc/supervisor/conf.d/messenger-worker.conf to:
[program:messenger]
command=php /var/www/mbin/bin/console messenger:consume async async_ap failed --time-limit=3600
user=www-data
numprocs=4
startsecs=0
autostart=true
autorestart=true
startretries=10
process_name=%(program_name)s_%(process_num)02d

Adjust the numprocs parameter to your needs. Also be aware of the path to the mbin repo. If you are coming from kbin and never changed your folder structure then the second line has to be changed to:

command=php /var/www/kbin/bin/console messenger:consume async async_ap failed --time-limit=3600
  1. Get the new release: git fetch && git checkout v1.4.0
  2. Run the update script: bash bin/post-upgrade.sh. If you get an error when running the db migrations you maybe have to stop your webserver, so nothing is trying to access the database.
  3. Refresh supervisor and start the new messenger group: supervisorctl reread && supervisorctl update && supervisorctl start messenger:*

What's Changed

Full Changelog: v1.3.0...v1.4.0