6

After trying to update attributes for 4 products in Magento 2.3.2 the Bulk Actions log shows that the update tasks have not started.

My Magento cron jobs appear to be running ok, why are bulk action tasks not starting?

enter image description here

UPDATE

After upgrading to Magento 2.3.3 I still had this problem. I had been using www-data as the file owner for my development system which I know is a bad practice. After resetting permissions as per Magento documentation and ensuring cron job was running as correct file owner the bulk actions run correctly.

  • 1
    Have you find the solution for this? I am also facing this – Teja Bhagavan Kollepara Jul 19 at 6:20
  • After a few days I noticed the bulk action tasks had ran. I need to test this some more as I do not know why the bulk actions failed to start, but then were executed some days later. – paj Jul 19 at 8:38
  • No, obviously there is a problem and we need to find out how to troubleshoot bulk action tasks. – paj Jul 19 at 10:54
1

Seems like a bug to me.

I fixed it by modifying this function in vendor/magento/module-asynchronous-operations/Model/BulkManagement.php

Bad of me but hey, maybe it's a PR :)

private function publishOperations(array $operations)
 {
        $operationsByTopics = [];
        foreach ($operations as $operation) {
+            $this->entityManager->save($operation);
            $operationsByTopics[$operation->getTopicName()][] = $operation;
        }
        foreach ($operationsByTopics as $topicName => $operations) {
            $this->publisher->publish($topicName, $operations);
        }
 }
  • Well spotted! I expect it will be fixed in the next release. – paj Jul 31 at 15:58
  • 2
    Created a ticket github.com/magento/magento2/issues/23958 – Tristan H Aug 5 at 12:28
  • I have updated above code but not working. – Rajesh Nagappan Oct 15 at 10:47
  • I have updated my question I think file owner permissions / cron owner could be contributing to this issue. – paj Oct 27 at 10:33
1

The magento cron in your web server is disabled. Set Magento cron by command line

crontab -e 

*/1 * * * * php -c {php.ini_path} {magento_path}/bin/magento cron:run
*/1 * * * * php -c {php.ini_path} {magento_path}/update/cron.php
*/1 * * * * php -c {php.ini_path} {magento_path}/bin/magento setup:cron:run

Or simply way is

php bin/magento cron:install [--force]
  • My cron jobs are running fine - just the bulk action tasks are not executing in a timely manner. – paj Jul 30 at 12:49
  • launch this command 'bin/magento cron:run' – yavonz15 Jul 30 at 13:35
  • after running bin/magento cron:run the bulk action task still has not ran - detail log shows it is pending in queue. – paj Jul 30 at 14:11
  • php version server?? – yavonz15 Jul 30 at 14:41
  • should the cron jobs be ran as the file system owner? – paj Oct 26 at 12:05
1

Maybe this is your idea, You can check again:

  1. Check again connect magento 2 to rabiitmq(php bin/magento queue:consumer:start)
  2. Check again process queue:consumer:start is starting(ps aux | grep "queue:consumer:start")
  3. Test Rest API with specifying API
  4. Copy data to test bulk API with same data, same routers
  • If you have attributes that won't update that say they are queued, you can run: php bin/magento queue:consumer:start product_action_attribute.update – seanbreeden Nov 25 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.