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..

Hello! We are facing huge performance issues in P&S event. Did anyone faced something like that

UNBSW8S8K
UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

Hello!

We are facing huge performance issues in P&S event. Did anyone faced something like that? It’s latest product-page-search package.

CC: @UK9N7MP96

«1

Comments

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

    Hi Janis,
    it looks it failed because of too many repeated columns and conditions, right?

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    I would guess so. I am not 100% sure. It happens for us in production, we see it failing, but not sure about reason.

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet
  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    It has really a lot bind parameters. Looks like it is every product. Could be that from somewhere it fetches full catalog, and it basically fails.

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

    which version of spryker/event you have?

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

    did you also check Propel.log for an exception, maybe there is more detail

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    2.5.1

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    We don’t have it enabled on production, as it is irrelevant info.

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

    ok

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    It’s clear from the message, that query has way too many bind parameters 5000+

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

    I think there is an issue regarding queries in shared container, let me check it

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

    can you check static::PROPEL_QUERY_PRODUCT_SEARCH in \Spryker\Zed\ProductPageSearch\ProductPageSearchDependencyProvider please?

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

    Spryker/Zed/ProductPageSearch/ProductPageSearchDependencyProvider.php:301

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

    This line will inject SpyProductSearchQuery into this module

  • ULTE9DBGX
    ULTE9DBGX Posts: 13 🧑🏻‍🚀 - Cadet

    exactly return SpyProductSearchQuery::create();

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    Exactly ☝

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

    according to this https://pimple.symfony.com/#defining-factory-services, we might fix it with this code

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

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

    $container->factory will let this instantiate each time

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

    @ULTE9DBGX can you replace it in \Pyz\Zed\ProductPageSearch\ProductPageSearchDependencyProvider please and check it again

  • ULTE9DBGX
    ULTE9DBGX Posts: 13 🧑🏻‍🚀 - Cadet

    let me try

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    It is like that already:


  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    Ahh, ok. Factory

  • UNBSW8S8K
    UNBSW8S8K Posts: 128 🧑🏻‍🚀 - Cadet

    Never mind.

  • ULTE9DBGX
    ULTE9DBGX Posts: 13 🧑🏻‍🚀 - Cadet

    Just FYI, also spy_product_search has no index on fk_locale, which makes this query running for more than 40seconds when you have more than 10m rows

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

    Ok Thanks @ULTE9DBGX I’ll let the core know about the missing index

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

    we will also release a patch for the cached query object

  • ULTE9DBGX
    ULTE9DBGX Posts: 13 🧑🏻‍🚀 - Cadet

    @UK9N7MP96 i applied the changes, seems like it’s working fine now

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

    Great, we are preparing the release, it’s under QA and hope will get done soon 😉

  • ULTE9DBGX
    ULTE9DBGX Posts: 13 🧑🏻‍🚀 - Cadet

    Nice, thanks