Hello!
I installed atrocore with PHP 8.4 and apache server , but I always have error with crontab
I defined a cron like properly (I have only deprecated php message).
Could you help me please?
but there are always problem

Hello!
I installed atrocore with PHP 8.4 and apache server , but I always have error with crontab
I defined a cron like properly (I have only deprecated php message).
Could you help me please?
but there are always problem

Hello,
Thank you for the details. The PHP deprecation messages are harmless. What matters is that cron starts the background processes (daemons) of AtroCore. Please check the following steps. Your installation will not run jobs until these processes are running.
1. Check the PHP version used by the command line
AtroCore needs PHP 8.4. The version used by Apache can differ from the one used by cron.
php -v which php
The first command must show 8.4.x. If php is a different version, use the full path of the 8.4 binary in the crontab, for example /usr/bin/php8.4.
2. Install the crontab for the web server user
The crontab must belong to the web server user (www-data on Debian/Ubuntu), not to root.
sudo crontab -e -u www-data
Add this single line and replace the project path with yours:
Use absolute paths, and keep the word cron at the end. Save and close the editor. Check that it was saved:
sudo crontab -l -u www-data
3. Run the command once by hand as the same user
This shows the real error if there is one:
sudo -u www-data /usr/bin/php /var/www/my-atrocore-project/console.php cron
It should end without errors.
Please also make sure that exec is not listed in disable_functions in that file. AtroCore uses exec to start its daemons.
4. Check that the daemons are running
Wait one or two minutes after saving the crontab, then run:
ps -aux | grep php
You should see lines like these (the last word is the application ID of your installation):
www-data ⊠php console.php daemon pt www-data ⊠php console.php daemon job-manager www-data ⊠php console.php daemon composer
If job-manager and pt are in the list, everything is working. If nothing appears, cron is not running the command. Check that the cron service is active and whether it logs an error:
sudo systemctl status cron grep CRON /var/log/syslog | tail
5. Common reasons it does not start
data/ or public/data/ (make sure this folder exists). Fix it with sudo chown -R www-data:www-data /var/www/my-atrocore-project.ls public/data/composer.log.If it still does not work, please send us:
php -v, sudo crontab -l -u www-data and ps -aux | grep php,data/logs/ in the project folder.Best regards
ok now the cron is nice because I put php8.4 in the command line.
But Iâve got this 500message error few minutes after launching export feed in json:
and in log file
process /usr/bin/env(2229553) exit(idle timeout), terminated by calling exit(), return code: 255
but I donât konw where is the problem
thank you for your help
when I put display error = on Iâve got this error in log file:
Log.ERROR: Uncaught Exception Laminas\HttpHandlerRunner\Exception\EmitterException: âUnable to emit response; headers already sent in /home/anguis/www/atrocore15/vendor/atrocore/atrocore-legacy/app/Espo/Core/Utils/File/Unifier.php:50â at /home/anguis/www/atrocore15/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php line 16 {âexceptionâ:â[object] (Laminas\HttpHandlerRunner\Exception\EmitterException(code: 0): Unable to emit response; headers already sent in /home/anguis/www/atrocore15/vendor/atrocore/atrocore-legacy/app/Espo/Core/Utils/File/Unifier.php:50 at /home/anguis/www/atrocore15/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:16)â}
Hi @Belette64 ,
Please can you show me your export feed configuration ?
You can use this button, and send the configurations there.
Thanks.
Hello Raoul! Thank you for your help. Now, all is right, but There is a problem with large file, Tasks are executed before the end of creating them. I put 2000 for max lines per task, I modify config.php with the value âat_onceâ but it is the same. could you help me in order to create first all import tasks and then launching them. Thank you
i dont understand this config, but if you want to import big files, depending on the number of fields the entity have, or if you are improting a lot of relations, i recommend you to reduce the number of record per iteration to 1000 for example. check if all Jobs succeded, if there are failures it can be caused by lack of resources on your server.
We can continue this conversation in french if you want : )
Thanks.
jâai ajoutĂ© cette ligne Ă config.php âqueueItemCreationTypeâ => âat_onceâ, sans succĂšs
Ce paramĂštre nâa aucun effet sur notre systĂšme.
AprĂšs le lancement de lâimport feed allez sur cette url âatrocoreinstance.com/#Jobâ et regardez le statut des jobs pour sâassurer que tous ce sont exĂ©cutĂ©s avec succĂšs, en cas dâĂ©chec un message sera prĂ©sent dans les dĂ©tails du Job.
les premiers jobs echouent toujours lors de lâimport dâun gros fichier csvâŠ
Vous pouvez me montrer le message dâerreur ? Vous pouver le voir sur la page de detail du job
les erreurs sont de type The Job â01a19719-9d24-72eb-aa78-a5192fc88c8bâ was not completed in the previous run.
et de type n exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
Essayez de rĂ©duire le nombre dâentrĂ©es a traiter par tĂąche. ceci est un problĂšme de ressources sur le serveur.
merci Raoul mais jâai mĂȘme essayĂ© Ă 100 et tjrs pareilâŠ