exponea / bloomreach-magento2-integration

MIT License
1 stars 5 forks source link

Purchase, Purchase Items and Product Variants Feed not working #44

Closed pip77 closed 5 months ago

pip77 commented 5 months ago

Hi,

We have activated the plugin and were able to do the initial import of the Products and Customer Feeds, but unfortunately the Initial Imports of Purchase, Purchase Items and Product Variants Feed are not working. After starting the feeds, they are stuck at PROCESSING and not showing anything inside the Progress Log. Also I was not able to find any errors in the cron.log, exception.log or bloomreach/debug.log.

Is there a way to have a more detailed log or do you have an idea where I can look for errors? Are the three stuck feeds maybe connected? Maybe the product_id? As far as I can see the product_id is not used in the Customer and Products Feed.

We are using Magento ver. 2.4.3.

Appreciate your help!

image image

pip77 commented 5 months ago

It seems like the jobs stop after 5 min. Is there any execution limit we need to configure?

vlmed commented 5 months ago

@pip77 it seems to be memory issue.

Check server logs (nginx or apache) for relevant errors. Like: Fatal error: Allowed memory size of 134217728 bytes exhausted.

The fix has been already implemented and will be available in the next release. As a temporary solution you can manually apply a fix: https://patch-diff.githubusercontent.com/raw/exponea/bloomreach-magento2-integration/pull/42.patch

Please share if fix is helpful for you after testing

pip77 commented 5 months ago

@vlmed also, if I set the PAGE_SIZE to 1 for example?

vlmed commented 5 months ago

@pip77 You can try, but I don't think it will help. There are 2 causes of memory issue:

You can find more detail in https://github.com/magento/magento2/issues/34851

pip77 commented 5 months ago

@vlmed what makes me curious is that it is working for 120k Customers, but not for 50k Product Variants. And I played around with the PAGE_SIZE and it stops at different amount of rows, but always at around 5 mins. Customers and Products is faster than 5 min.

eduard13 commented 5 months ago

Hi @pip77, thank you for reaching us. Seeing the amount of orders you have, I'm assuming that you are getting out of memory, that you can only see this in your server's logs. We've already a fix for this problem (see #42), so you can apply it as a patch.

However, today we have released a new 1.1.0 version, that includes that fix, so you can upgrade to the latest version.

Soon, the new version should be also available on the Adobe Marketplace.

Thank you.

vlmed commented 5 months ago

@pip77 Actually this is an interesting question. It might be related to some customizations or third party modules or whatever. We tested the extension with more than 1 million products and the import went well. Please try to apply the fix and run the import again. Most likely, this will solve the problem.

pip77 commented 5 months ago

Thank you both. We will try.

pip77 commented 5 months ago

@vlmed @eduard13 thank you for your help. We have found the problem. The crons where killed after 5 minutes by the server. We have adjusted this configuration.

After increasing the allowed memory, the max runtime of the crons and fixing and fixing the error below, everything seems to work as expected.

Return value of Bloomreach\EngagementConnector\Model\DataMapping\FieldValueRenderer\Order\ProductList::getProductSku() must be of the type string, null returned

I have created a new issue for the error above: https://github.com/exponea/bloomreach-magento2-integration/issues/46

We can close this issue here I guess.

pip77 commented 5 months ago

Maybe it is worth to mention the max runtime for crons inside the docs, because it was hard to find within the logs.