Hi Chris, I have followed the recommend way, but now I need to adjust the VM scale settings. I tried changing the VM count setting as per flyio docs but this has only changed the āappā pool, do you know how to update scale count for ācronā and āworkerā ?
VM Memory: 2 GB
Count: app=8 cron=1 worker=1
Max Per Region: app=0 cron=0 worker=0
Thanks Chris, got the scheduler and 1 queue worker running !
This was achieved by setting the VM to a lower spec for the cron and queue VMs ::: fly scale vm shared-cpu-1x --group worker
and fly scale vm shared-cpu-1x --group cron
The VMs all instantiated on my primary region at first, so this solve that ::: fly scale count --max-per-region=1 cron=2 worker=2
Then I noticed my app VMs were only instanting in my primary region (dfw) soā¦ fly scale count 2 --max-per-region=1
However the max-per-region doesnāt seem to be set for my app VMsā¦
VM Size: dedicated-cpu-1x
VM Memory: 2 GB
Count: app=2 cron=2 worker=2
Max Per Region: app=0 cron=1 worker=1
and my app will only launch in my primary region nowā¦
Instances
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
3816548c app 24 dfw run running 1 total, 1 passing 0 10m42s ago
e3eb7e4a worker 24 dfw run running 0 13m54s ago
33f91dec cron 24 syd run running 0 13m54s ago
02e20f47 cron 24 dfw run running 0 13m54s ago
bc275f96 worker 24 syd run running 0 13m54s ago
9afe1486 app 24 dfw run running 1 total, 1 passing 0 3h30m ago
Note that the items in /etc/services.d are directories, not files. The directories nginx and php-fpm contain a script named run.
In your case, you should create directoryqueue and cron and within each directory, have a script named run.
This means your Dockefile commands can use with mv to move those directories or cp -r (with the -r flag!) as needed with copying directories.
Lastly, donāt forget I also had a mistake in the original post, the queue:work command should be /var/www/html/artisan, not /var/www/html artisan(no space!).
From the linked post, to show what I mean exactly because Iām feeling pedantic apparently :