What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

I have a P&S issue. The product data in ElasticSearch is out of sync with the database. I’m tryi

UNTTWV4JK
UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

I have a P&S issue. The product data in ElasticSearch is out of sync with the database. I’m trying to sync it, but something is not going well. I tried to run vendor/bin/console sync:data product_abstract <id> , I get the following error.


I triggered events for the products I want to sync, nothing changed.

Do you have any suggestions about what can I try/check?

«1

Comments

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    Hi Florin, Spryker already fixed this and released new plugins please remove deprecated ones

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    this is deprecated \Spryker\Zed\SynchronizationExtension\Dependency\Plugin\SynchronizationDataRepositoryPluginInterface

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    Just to make sure I get it right, I should replace the plugins from \Pyz\Zed\Synchronization\SynchronizationDependencyProvider::getSynchronizationDataPlugins with the “bulk” ones?

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    usually if they are deprecated, the PHP storm can highlight them

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    yes, but I cannot remove them from vendor, I can only remove the plugins from the dependency provider

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    btw you either need sync:data or event:trigger not both together

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    I’m changing the plugins now.

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet
    edited October 2019

    yes you need to replace the deprecated plugin with a new plugin in dependency provider in Pyz

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet
    edited October 2019

    and also check your propel.log to see which query takes the whole memory?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    @UK9N7MP96 we can also replace the all plugin with a bulk plugin that implements the new interface (Bulk) but the bulk plugin need also a new find method in repository that take care to filter transfer etc...
    I think that we have to wait until the new bulk plugins come in core otherwise there is a lot of code to create/extend.

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet
    edited October 2019

    @UL65CH0MC It’s correct, but we have ticket to replace all deprecated plugins with a ones. we only recommend extend approach when this is an urgent issue for you.

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    I updated the plugins, nothing changed. FYI the product has 38 entries in spy_product_abstract_page_search .

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    how many abstract products do u have imported/created?

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    I want to sync 1 product

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    ok, let me understand..

    do u need to publish or synchronize this product?

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    yes, elasticsearch is out of sync with the database

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    the data from the tables is right but not in elasticsearch

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    I triggered events for the product

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    tried to run sync:data command and it runs out of memory

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    ok, then synchronize...
    did u called the queue:worker:start?
    or do u have jenkins enabled?

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    @UNTTWV4JK did you also check the propel.log?

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    FYI the environment is multistore (20 stores with several locales), spy_product_abstract_page_search has 38 entries for this product

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    I don’t have propel.log on production

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    and exception.log?

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet

    also, this one if I try with several products

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 🧑🏻‍🚀 - Cadet
    Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 12288 bytes) in /data/vendor/spryker/util-encoding/src/Spryker/Service/UtilEncoding/Model/Json.php on line 32
    ErrorException - Exception: FATAL ERROR - Allowed memory size of 2147483648 bytes exhausted (tried to allocate 12288 bytes)
    in /data/vendor/spryker/util-encoding/src/Spryker/Service/UtilEncoding/Model/Json.php (32)
    
  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet
    edited October 2019

    I don’t have propel.log on production

    Can you enable it? or somehow reproduce it on your local machine?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    yes i know the memory allocation problem..

    u have maybe to purge the event queue and trigger the event only for 1 product to check if the synch for this product work as well..

    It can be possible that your event is still in event queue and cannot be consumed... please check if everything is clear and start again..

    I need more infos about the status of your rmq and jenkins etc.. to ensure that everything is fine and then we can test the scenario only with 1 product..

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 🧑🏻‍🚀 - Cadet

    Is that a full trace?