10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.25k stars 313 forks source link

Indexing fails for some products (WooCommerce) #1735

Closed spape84 closed 4 years ago

spape84 commented 4 years ago

Describe the bug The bug occurs when trying to index our website using Elastic Press. We are running a WooCommerce store with 4500 products with 5 variations for each product. When indexing some posts/pages/products (700 of them) are not indexed.

The following messages+many more appear on the CLI, when running the command from CLI: `[illegal_argument_exception] Limit of total fields [5000] in index [oursitecom-post-1] has been exceeded

Steps to Reproduce Run our site and then "wp elasticpress index --show-errors" on the CLI

Expected behavior Indexing suceeds

Environment information

version: 5.2.5 site_language: de_DE user_language: de_DE permalink: /%postname%/ https_status: true user_registration: 0 default_comment_status: open multisite: false user_count: 432 dotorg_communication: true

wp-paths-sizes

wordpress_path: /var/www/vhosts/oursite.com/oursite wordpress_size: loading... uploads_path: /var/www/vhosts/oursite.com/oursite/wp-content/uploads uploads_size: loading... themes_path: /var/www/vhosts/oursite.com/oursite/wp-content/themes themes_size: loading... plugins_path: /var/www/vhosts/oursite.com/oursite/wp-content/plugins plugins_size: loading... database_size: loading... total_size: loading...

wp-dropins (3)

advanced-cache.php: true db.php: true object-cache.php: true

wp-active-theme

name: WordPress Child Theme Atomion version: 1.0 author: MarketPress author_website: https://marketpress.de parent_theme: WordPress Theme Atomion theme_features: post-thumbnails, automatic-feed-links, title-tag, woocommerce, html5, align-wide, align-full, custom-background, customize-selective-refresh-widgets, custom-logo, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, menus, widgets theme_path: /var/www/vhosts/oursite.com/oursite/wp-content/themes/wordpress-theme-atomion

wp-themes (2)

FoundationPress: version: 2.10.4, author: Ole Fredrik Lie WordPress Theme Atomion: version: 1.2, author: marketpress.de

wp-plugins-active (37)

Activity Log: version: 2.5.2, author: Activity Log Team AJAX Search for WooCommerce: version: 1.6.3, author: Damian Góra Atomion WooCommerce Blocks: version: 1.0.3, author: MarketPress Custom Related Products for WooCommerce: version: 1.3, author: Scott Nelle DATEV Format Export: version: 0.1, author: Sebastian Pape DHL for WooCommerce: version: 1.6.8, author: DHL ElasticPress: version: 3.4.1, author: 10up German Market: version: 3.9.1.1, author: MarketPress (latest version: 3.10) JSON Basic Authentication: version: 0.1, author: WordPress API Team Lightbox with PhotoSwipe: version: 2.80, author: Arno Welzel Ninja Forms: version: 3.4.24.1, author: Saturday Drive Ninja Forms - Webhooks: version: 3.0.5, author: The WP Ninjas PayPal PLUS for WooCommerce: version: 2.2.0, author: Inpsyde GmbH Safe SVG: version: 1.9.8, author: Daryll Doyle Simple Lightbox: version: 2.7.1, author: Archetyped Smart Slider 3: version: 3.3.28, author: Nextend Smart Slider 3 Pro: version: 3.3.28, author: Nextend Sofort Banking for WooCommerce: version: 1.4.4, author: Sven Wagener User Role Editor: version: 4.53.1, author: Vladimir Garagulya User Switching: version: 1.5.4, author: John Blackbourn & contributors W3 Total Cache: version: 0.13.2, author: BoldGrid WC User Role Based Coupon: version: 0.2, author: Varun Sridharan WebP Express: version: 0.17.3, author: Bjørn Rosell WooCommerce: version: 3.7.1, author: Automattic (latest version: 4.0.1) WooCommerce Amazon Pay: version: 1.11.1, author: WooCommerce WooCommerce Google Ads Conversion Tracking: version: 1.6.3, author: Wolf+Bär Agency WooCommerce Google Ads Dynamic Remarketing: version: 1.7.15, author: Wolf+Bär Agency WooCommerce Google Analytics Pro: version: 1.8.8, author: SkyVerge WooCommerce Google Product Feed: version: 7.8.3, author: Ademti Software Ltd. WooCommerce Payment Gateway Später zahlen: version: 1.0.2, author: SkyVerge WooCommerce PayPal Checkout Gateway: version: 1.6.20, author: WooCommerce (latest version: 1.6.21) WooCommerce Role Based Methods: version: 2.4.1, author: WPBackOffice WooCommerce Stripe Gateway: version: 4.3.3, author: WooCommerce WooCommerce Table Rate Shipping: version: 4.2, author: Bolder Elements WP Mail SMTP: version: 1.9.0, author: WPForms Yoast SEO Premium: version: 13.4.1, author: Team Yoast

wp-plugins-inactive (7)

B2B Market: version: 1.0.5, author: MarketPress Category Order and Taxonomy Terms Order: version: 1.5.7.2, author: Nsp-Code PW WooCommerce Bulk Edit Pro: version: 2.205, author: Pimwick, LLC Transients Manager: version: 1.8, author: Pippin Williamson WooCommerce Min and Max Quantities: version: 3.0.3.9, author: BeRocket WP Store Locator: version: 2.2.232, author: Tijmen Smit

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1673 imagemagick_version: ImageMagick 6.8.9-9 Q16 x86_64 2019-11-12 http://www.imagemagick.org imagick_limits: imagick::RESOURCETYPE_AREA: 62 GB imagick::RESOURCETYPE_DISK: -1 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 62 GB imagick::RESOURCETYPE_MEMORY: 31 GB imagick::RESOURCETYPE_THREAD: 8 gd_version: bundled (2.1.0 compatible) ghostscript_version: 9.26

wp-server

server_architecture: Linux 4.18.0-25-generic x86_64 httpd_software: Apache php_version: 7.3.16 64bit php_sapi: fpm-fcgi max_input_variables: 3000 time_limit: 30 memory_limit: 1536M max_input_time: 60 upload_max_size: 32M php_post_max_size: 32M curl_version: 7.47.0 OpenSSL/1.0.2g suhosin: false imagick_availability: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 5.7.29-0ubuntu0.16.04.1 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /var/www/vhosts/oursite.com/oursite/wp-content WP_PLUGIN_DIR: /var/www/vhosts/oursite.com/oursite/wp-content/plugins WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: false WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: true SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable

wp_mail_smtp

version: 1.9.0 license_key_type: lite debug: No debug notices found.

`

Additional context None

oscarssanchez commented 4 years ago

Hi @spape84 ,

In the past folks have raised similar issues related to this, my guess is that you have too many post meta keys to map on Elasticsearch, see: #1263 or #1267

If you confirm the same, my suggestion would be to first clean up your post meta table as much as you can from unused data. If you keep getting the same issue, manually selecting which post meta keys to include would be the next step. In the case you need more than 5000+ fields, you could even raise this number via a filter, but I do not recommend this.

Please let us know how it goes.