Indexer errors

FiboFilters relies on an internal index to function correctly. If the index cannot be built, filters will not be available.

Table of Contents

Indexer logs

When an indexing error occurs, FiboFilters will display a message in the “Indexer” tab in WooCommerce > FiboFilters. To help diagnose the issue, toggle the “Show logs” option to view the exact error message:

You can also check more detailed logs in WooCommerce > Status > Logs > fibofilters-fail-indexer:

FiboFilters indexer logs

In most cases, indexer failures are caused by server restrictions or blocked HTTP requests. This guide outlines common issues and provides solutions to get your indexer running.

Troubleshooting errors 001 and 002

Errors 001 and 002 mean that the indexer has stalled for unknown reasons. FiboFilters has detected that no progress is being made. Below are common causes and how to resolve them.

Server cannot send HTTP requests to itself

FiboFilters uses the WordPress function wp_remote_post() to build the index asynchronously. If your server blocks HTTP requests to itself, it may result in HTTP 401 (Unauthorized) or 403 (Forbidden) errors.

Solution 1: Check Site Health

  1. Navigate to Tools > Site Health.
  2. Look for issues related to the REST API or loopback requests:
    REST API issue
    Loopback issue
  3. Expand those messages and follow the provided recommendations.
  4. If necessary, contact your hosting provider to resolve the issue.

Solution 2: Whitelist your server IP

If your site is restricted to a list of IPs (e.g., via .htaccess), make sure your own server IP is included in the whitelist. This is a common oversight that prevents internal HTTP requests.

Solution 3: Set the indexer mode to direct

If the server can’t send HTTP requests to itself, you can instruct FiboFilters to switch to the direct indexing mode, which doesn’t require HTTP requests. You can do it by adding the following line to the wp-config.php file:

define( 'FIBOFILTERS_INDEXER_MODE', 'direct' );

Learn how to add PHP constants to the wp-config.php file.

Note: if there is a large number of products in your store, setting the mode to direct may cause timeouts.

WP-Cron is not working properly

FiboFilters may use WP-Cron to resume and complete indexing tasks. While not always necessary, WP-Cron becomes critical if the process stalls.

Solution: Use Advanced Cron Manager

  1. Install the Advanced Cron Manager plugin.
  2. Check if the following action is present: fibofilters_build_filters_index_cron.
  3. Run this action manually to progress the indexing.
  4. If the indexer still stalls, repeat the manual run until it completes.

For a permanent fix, investigate why WP-Cron isn’t executing automatically and resolve that issue with your hosting provider.

Too large product set

Products and other objects, such as terms, variations, etc., are divided into batches and processed by the indexer in the background. Sometimes, these batches may take too long to process.

Solution: Reduce the batch size

To reduce the batch size, add the following code to your website:

add_filter( 'fibofilters/indexer/filters_set_items_count', function() {
	return 10;
} );

Learn how to add this snippet to your WordPress.

After adding the code, try rebuilding the index. If it still doesn’t work, try reducing the number even further.

Troubleshooting errors 003 and 004

003 and 004 errors may indicate that the values of max_user_connections or max_connections set for the MySQL database are too low.

Solution: Increase max_user_connections and max_connections

Contact your hosting provider and ask them to increase the max_user_connections and max_connections values in the database configuration file.

Troubleshooting error 005

The 005 error means that the database server timed out and closed the connection before FiboFilters could complete the indexing process.

Solution 1: Increase wait_timeout

Contact your hosting provider and ask them to increase the value of the wait_timeout variable on your MySQL server.

Solution 2: Reduce the batch size

If your hosting provider is unable to change MySQL variables, add the following code to your website to reduce the number of products indexed in a single batch:

add_filter( 'fibofilters/indexer/filters_set_items_count', function() {
	return 10;
} );

Learn how to add this snippet to your WordPress.

After adding the code, try rebuilding the index. If it still doesn’t work, try reducing the number even further.

Troubleshooting error 006

If you have a large number of products and terms, and your MySQL server has the max_allowed_packet variable set to a low value, the indexer may get stuck with a 006 error.

Solution: Increase max_allowed_packet

Contact your hosting provider and ask them to increase the value of the max_allowed_packet variable on your MySQL server.

Troubleshooting other errors

Go to WooCommerce > FiboFilters > Indexer, and carefully read the error message along with the proposed solutions.

Still not working? Submit a support request.