FreeScout in the LAMP app
-
Has anyone successfully used FreeScout in the LAMP app? I need to move an instance from a non-Cloudron server and this seemed to be the best solution considering that there is unfortunately no easy method of copying over conversations from an old install to a new one.
I have everything copied over, set up and working, but the queue seems to freeze when the cronjob runs also causing the fetching of mails to stop. Clearing the cache gets things going again - but only until the next cronjob runs a minute later. I have been unable to find anything in the logs or in the Freescout issue reports that would identify the problem. Any suggestions would be much appreciated.
-
no. but interesting question. a quick search revealed https://github.com/freescout-help-desk/freescout/issues/2878. Do you want to try this?
-
no. but interesting question. a quick search revealed https://github.com/freescout-help-desk/freescout/issues/2878. Do you want to try this?
@luckow Thanks for the link. That is basically what I did, then cleared the caches manually as the server was throwing a 500 error due to incorrect paths in the cache configuration. There are several threads dealing with problems with the queue:work (a common issue with lavarel by all accounts) but none of them quite resolve the problem.
I just found one thread that suggests addditional cronjobs to execute queue:work manually and resart it every hour in case it gets stuck. This seems to have resolved the problem with fetching which is now working every minute, and sending seems to be working as well, although the status page suggests queue:work is not being executed. I'll observe further.
-
you can also find some hints in the package source code - https://git.cloudron.io/packages/freescout-app .
-
you can also find some hints in the package source code - https://git.cloudron.io/packages/freescout-app .
I have discovered the apparent sticking point in the LAMP app, but cannot work out why it is happening:
If I run
sudo -u www-data php8.3 /app/data/public/artisan schedule:run > /dev/null 2>&1
in the terminal I can see all the commands that are executed, the last one being
'/usr/bin/php8.3' 'artisan' queue:work --queue='emails,default' --sleep=5 --tries=1 --timeout=1800 sudo -u www-data php8.3 /app/data/public/artisan schedule:run > /dev/null 2>&1
This executes the queue and it shows as running, but the job freezes until it times out at which point the queue shows as no longer running.
If I run the command via cron the same thing happens, but for some reason the queue is not executed (or at least that is what it shows on the status page). Subsequent cronjobs do not work so mail fetching stops until the hardcoded timeout is reached.
I tried adding a cronjob for
sudo -u www-data php8.3 /app/data/public/artisan queue:restart > /dev/null 2>&1
This works insofar as mail fetching works, but the queue is not shown as running.
Long story short, I think the questions I need answering are why is the job freezing and what is different about executing it via cron and directly via the terminal? The logs show nothing unusual, so I honestly don't know where else to look.
-
Just light reading of the package code:
- There is a cron run every minute
php artisan schedule:run --no-interaction
https://git.cloudron.io/packages/freescout-app/-/blob/master/cron.sh?ref_type=heads#L10 . Put this in cron section - https://docs.cloudron.io/apps/#cron - Then, a queue is run as process separately
php artisan schedule:run
. https://git.cloudron.io/packages/freescout-app/-/blob/master/supervisor/artisan-queue.conf?ref_type=heads#L2 . This can also be put in the cron as a@service php artisan schedule:run
(adjust command)
- There is a cron run every minute
-
Just light reading of the package code:
- There is a cron run every minute
php artisan schedule:run --no-interaction
https://git.cloudron.io/packages/freescout-app/-/blob/master/cron.sh?ref_type=heads#L10 . Put this in cron section - https://docs.cloudron.io/apps/#cron - Then, a queue is run as process separately
php artisan schedule:run
. https://git.cloudron.io/packages/freescout-app/-/blob/master/supervisor/artisan-queue.conf?ref_type=heads#L2 . This can also be put in the cron as a@service php artisan schedule:run
(adjust command)
Thanks for that. A small step closer maybe as putting those two in the cron section gives me the same result as including
/app/data/public/artisan queue:restart
Mail fetching is OK, however, I still get the red text
queue:work Last run: ? Last successful run: ? Try to clear cache to force command to start.
and not 'running' on the status page. Clearning the cache doesn't help.
- There is a cron run every minute
-
mm, don't know much PHP. But maybe worth debugging the code a bit there to figure what it is expecting to be run.
-
I couldn't resolve this but discovered that it isn't in fact as complicated as I thought it would be to migrate to the Freescout App. Just in case anyone else comes up against this challenge:
- Install and setup Freescout app
- Drop all the tables in the database and import database from previous installation
- If you have any modules: upload module folders to storage/modules
- Upload attachments folder to storage
Done