• I am facing some issue with checkout page. When user adds his pin code during checkout, the website takes some time to check whether the pin code is serviceable or not. Furthermore during this time, my website consumes 100% of the CPU resources.

    I recently made changes in shipping Zone where instead of accepting delivery across the country, I had to manually add 8000+ pin codes where delivery is allowed at the moment due to coronavirus.

    I guess this seems to be the issue. Any idea how to fix it??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @mayank29gupta,

    It sounds like the site may be having a hard time looking through such a large number of codes for validation. Is a “pin code” a postcode? If so would it be possible to use ranges or wildcards to shorten the list of possibilities? That could make the task easier for the system.

    You might also check and see if there are any fatal errors that are generated when this happens. The logs are available at WooCommerce > Status > Logs. The drop-down at the top can be used to locate any fatal errors by date. If the system runs out of memory or other resources, it may be mentioned here.

    Let me know if changing up the pin codes helps or if you find anything in the logs.

    Cheers

    Thread Starter mayank29gupta

    (@mayank29gupta)

    Hi @3sonsdevelopment thanks for the reply. I found this error in the logs, it’s being repeated several times.

    2020-05-11T13:51:19+00:00 CRITICAL Maximum execution time of 30 seconds exceeded in wp-content/plugins/woocommerce/includes/class-wc-shipping-zone.php on line 374

    I am guessing that it caused the error. I didn’t had idea of wildcards for pin codes, will try them out in morning to make it easy for website.

    Thanks for posting the error message. It looks like this is running out of time before the system can finish. You could ask the web host to increase the max execution time and that may help out too.

    Let us know how it goes.

    Thread Starter mayank29gupta

    (@mayank29gupta)

    @3sonsdevelopment Thanks, I will try to check with host but since its shared hosting I doubt they would help. I will try to use wildcards as much as possible.

    While going through the logs, I also saw one other fatal error. Is it in some way also connected?

    2020-05-10T18:35:45+00:00 CRITICAL Maximum execution time of 30 seconds exceeded in wp-includes/functions.php on line 578

    The Line 578 is

    return @unserialize( $original );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Checkout Page Consuming 100% CPU’ is closed to new replies.