• Hi,

    We have a client whose site constantly timed out after they imported their products. It seems the copious amount of database queries were killing our server, even after increasing the resources. I’ve made one adjustment to your wcpaf.php file, and added a lot of filters and wp_query calls to the theme to enable the filters to be displayed on all pages, re-enable the search box for select2, and even created an ajax version of the widget to populate options as the user types in the searchbox – this new widget also uses a single db query instead of multiple get term object calls.

    wcpaf.php between lines 452 and 455, function WCPAF::queryForMeta() – please move $unfiltered_price_range inside the if statement to prevent having to call WCPAF::getPriceRange() if no min or max price has been set. It is unused otherwise, and this particular query was causing the server to timeout, even with only 3000 products. It would be beneficial to ensure that this is adjusted for future updates.

    Please let me know if you would like my copy of the ajax widget.

  • The topic ‘Timeouts with large product databases’ is closed to new replies.