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

2Β»

Comments

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UK9N7MP96 I will try to get the propel log/reproduce it on local but it will take some time.

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    which version of product-page-search do u have?

    this version https://github.com/spryker/product-page-search/releases/tag/3.9.0. fix some memory problem (come from 2 week ago)

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    @UL65CH0MC that fixed the publishing memory issue, but it looks @UNTTWV4JK has memory issue on synchronization part

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UK9N7MP96 this is the full error ```
    Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 12288 bytes) in /data/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php on line 238
    ErrorException - Exception: FATAL ERROR - Allowed memory size of 2147483648 bytes exhausted (tried to allocate 12288 bytes)
    in /data/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php (238)

    Command: vendor/bin/console sync:data product_abstract 26940

    Trace:

    0 /data/vendor/spryker/error-handler/src/Spryker/Shared/ErrorHandler/ErrorHandlerEnvironment.php(99): Spryker\Shared\ErrorHandler\ErrorHandler->handleFatal()

    1 [internal function]: Spryker\Shared\ErrorHandler\ErrorHandlerEnvironment->Spryker\Shared\ErrorHandler{closure}()

    ```

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UK9N7MP96 u are right...

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UNTTWV4JK this line is not in the full stack


  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    however that doesn’t tell too much

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    AFAIK the P&S is building pairs between the storage entries and the entities to determine what need to be saved. 38 entries from the spy_product_abstract_page_search paired with the entities… this will use a lot of memory before starting to save the data in elastic

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    True, but this is happening in publishing part when you run queue:worker:start or queue:task:start event

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    sync:data is responsible to query the product_abstract_page_search or product_abstract_storage to just return the value of data column and write them in to the queue

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have 2,5Mio Products with 7000Attributes and other stuff and just test on my system the console command synch product abstract and it seems that everything works fine.. .BUT: i have only 1Store, 1Language, 1Currency now..

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    we have more

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    20 stores, 8 locales, 8 currencies, 2 price types…

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    and only 38 products? right?

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    or only 38 are published and u have more?

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    no, these are the search entries for one product

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    is combination of stores/locale

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    for one product

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok understood... yes i know your environment..

    I noted on my system that i give as u only 1 id to be published but i see that the command just fetch all products... can u please check if before the memory fatal error u see some events on rmq under sync.search.product?

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    @UNTTWV4JK which version of spryker/product-page-search are you using?

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    I found a bug for sync:data for specific ids here
    Spryker/Zed/Synchronization/Business/Export/ExporterPluginResolver.php:72
    $ids is missing

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    will report it now

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    @UNTTWV4JK can you reduce the chunk size?

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can do it by adding this line into your config_default-production.php

    $config[\Spryker\Shared\Synchronization\SynchronizationConstants::EXPORT_MESSAGE_CHUNK_SIZE] = 50;

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    this is the query which works with chunking and avoid any memory issue, if you still get memory issue you can reduce the chunk size


  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    \Spryker\Zed\Synchronization\Business\Iterator\SynchronizationDataQueryContainerPluginIterator

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks for suggestions, I will try tomorrow.

  • Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    FYI: The memory issue is gone after adding the $ids in the method.

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes that will be fixed in new release for that module, but without id you should not see any memory issue as well

Welcome!

It looks like you're new here. Sign in or register to get started.