• Resolved Kimball31

    (@kimball31)


    I have several products with tons of variations. “Create All Variations” works fine the first few times. It takes about 11 seconds to process a batch of 50 on my server. But when I get to over 900 variations already created things change. When I click “Create All Variations” (still only 50 in a batch) the spinning icon continues to spin and never stops even after 10 minutes. I never get the “NN variations added” popup.

    Behind the scenes, the processing did work. If I reload the page I see the variations count went up by 51.

    I built a test store (environment below), and imported just a few products. Same issue. Processing icon never stops.

    Any suggestions how to fix this?

    Environment:
    WP 4.9.8
    WooCommerce 3.5.2
    Storefront 2.4.1

Viewing 6 replies - 1 through 6 (of 6 total)
  • Howdy ??

    This is going to boil down to a lack of system resources to process the adding of variations. Querying variations is very server intensive and that is why there is a limit of 50 per batch in the first place.

    In order to get some further information about this, use your browser’s developer tools.

    Open your browser’s developer tools and inspect the requests to add variations under the network tab/XHR. In Chrome, that would look something like this:

    The expected status is 200

    And I suspect that on requests that are sent where you don’t receive a verification popup and the spinners remain, there is a Status of something other than 200. I suspect that the status would be 500 which would indicate a PHP fatal error. If that is the case, then we would also expect that there would be corresponding error messages logged. You can check in WooCommerce -> Status -> Logs and then in the dropdown selector there, find any logs that begin with fatal-errors followed by a random string of characters, followed by today’s date. Select that, press “view” to view the message. If those exist, I suspect the messages will indicate that there is either memory exhaustion or that the maximum execution time has been exceeded.

    Another possibility is that the status would be 502, 503, or 504 – those status codes indicate a gateway server has timed out. This is common in the case of reverse-proxying type setups. The corresponding error messages would be logged by the gateway server.

    Resolving this will require that the site is hosted on a hosting plan that has sufficient resources to handle the requests.

    Kind regards,

    Thread Starter Kimball31

    (@kimball31)

    Thank you @wbrubaker

    I’m getting a 504 error. This is on SiteGround shared hosting that I thought was pretty good. I’ll see if there is anything SiteGround can do, or more else where. Any recommendations on shared hosting that works well for WooCommerce?

    504 Gateway Timeout
    The gateway did not receive a timely response from the upstream server or application.

    Shared hosting and a large number of variations is not going to be a winning combination.

    Thread Starter Kimball31

    (@kimball31)

    Here is what SiteGround said and did:

    I have increased the dynamic timeout for the admin-ajax.php scripts, by adding the following code in the .htaccess files of the websites.
    Code:

    <IfModule mod_dtimeout.c>
    <Files ~ ".php">
    SetEnvIf Request_URI "admin-ajax.php" DynamicTimeout=300
    </Files>
    </IfModule>

    This just buys me some time till the “Create All Variations” script needs more that 300 seconds to run.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @kimball31 Glad that your host was able to help you out with this.

    I have one question, do you need 900 variations? It is possible to create “Any” variations that cover all of the values under the attributes. You would only need the specific variations for all 900+ if you needed a SKU or a different pricing per variation.


    Link to image: https://cld.wthms.co/TzOAOn

    Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Variations processing icon never stops’ is closed to new replies.