10up / ElasticPress

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

BUG: New Post and Edit Post - categories and tags in sidebar take 30s+ to appear with EP enabled #3792

Closed neilb400 closed 9 months ago

neilb400 commented 11 months ago

Describe the bug

Since the update to 5.0.x, whenever the ElasticPress plugin is enabled, when creating a new post or editing an existing one, the categories and tags sections in the right-hand sidebar take over 30 seconds to appear. The rest of the page does not render properly (e.g. SEO fields) until these have loaded.

Developer Tools in the browser shows that the relevant queries are taking 15-20s to be proceesed.

If the plugin is disabled, these boxes appear in the usual less than 1s.

The same combination of plugins was in use before the update of EP, so we are wondering what might be new that would impact on performance specifically in that area.

Steps to Reproduce

  1. Enable the ElasticPress plugin
  2. Go to wp-admin/post-new.php or wp-admin/post.php?post=[post ID]&action=edit
  3. Wait for categories and tags to load in sidebar

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

felipeelia commented 11 months ago

@neilb400 we'll need you to share your Status Report so we know at least which plugins and features you are using. Thanks

neilb400 commented 11 months ago

@neilb400 we'll need you to share your Status Report so we know at least which plugins and features you are using. Thanks

@felipeelia Thank you for replying. Sure, here you go:

ElasticPress.io

WordPress

WordPress Environment

wp_version: 6.3.2 home_url: [...] site_url: [...] is_multisite: false theme: [...] plugins: Advanced Custom Fields PRO (6.2.4), Akismet Anti-spam: Spam Protection (5.3), Align RSS Images (1.3.4), Announcer - Pro (6.0), bbPress (2.6.9), bbPress - Report Content (1.0.5), bbPress Moderation (1.8.3), Better Notifications for WP (1.9.3), CAPTCHA 4WP (Premium) (7.3.1), Classic Widgets (0.3), ElasticPress (5.0.1), GD bbPress Tools (3.4.1), Gleam (1.0), Gravity Forms (2.8.0), Gravity Forms Mailchimp Add-On (5.2.0), Jetpack (12.9), Perfmatters (2.2.0), Publish to Apple News (2.4.0), Safe SVG (2.2.2), SEOPress (7.2), SEOPress PRO (7.2), Show Parent Comment (0.2.1), ThirstyAffiliates (3.10.21), ThirstyAffiliates Pro (1.7.8), VaultPress (2.2.4), WP Crontrol (1.16.1), WP Mail SMTP (3.10.0) and Yoast Duplicate Post (4.5) revisions: 4

Server Environment

php_version: 8.1.18 memory_limit: 40M timeout: 300

Indexable Content

[...] post_count: 15,736 page_count: 27 creditcards_count: 0 post_meta_keys: 1 page_meta_keys: 1 creditcards_meta_keys: 0 total-all-post-types: 1 distinct-meta-keys: ep_exclude_from_search

ElasticPress

Settings

host: [...]clients.hosted-elasticpress.io index_prefix: [...] language: en_GB per_page: 20 network_active: false

Timeouts

request_timeout: 5 index_document_timeout: 15 bulk_request_timeout: 30

Elasticsearch Indices

[...]

health: green status: open index: [...] uuid: [...] pri: 1 rep: 1 docs.count: 12693 docs.deleted: 20 store.size: 202.3mb pri.store.size: 100.9mb total_fields_limit: 5000 analyzer_language: english stop_language: english snowball_language: English

Last Sync

2023/12/13 7:21:39 pm

method: WP Dashboard is_full_sync: Yes end_date_time: 2023/12/13 7:47:26 pm total_time: 0 hours, 25 minutes, 48 seconds total: 12692 synced: 12692 skipped: 0 failed: 0 errors: array ( ) trigger: manual final_status: success

Feature Settings

Post Search

active: true decaying_enabled: 1 force_inactive: false highlight_enabled: 0 highlight_excerpt: 0 highlight_tag: mark synonyms_editor_mode: simple synonyms:

# Defined sets ( equivalent synonyms).
[...]

Defined alternatives (explicit mappings).

shoes => sneaker, sandal, boots, high heels

weighting: array ( 'post' => array ( 'post_title' => array ( 'weight' => 20, 'enabled' => true, ), 'post_content' => array ( 'weight' => 5, 'enabled' => true, ), 'post_excerpt' => array ( 'weight' => 1, 'enabled' => true, ), 'author_name' => array ( 'enabled' => true, 'weight' => 1, ), 'terms.post_tag.name' => array ( 'weight' => 1, 'enabled' => true, ), 'terms.category.name' => array ( 'weight' => 1, 'enabled' => true, ), ), 'page' => array ( 'post_title' => array ( 'weight' => 20, 'enabled' => true, ), 'post_content' => array ( 'weight' => 5, 'enabled' => true, ), 'post_excerpt' => array ( 'weight' => 1, 'enabled' => true, ), 'author_name' => array ( 'enabled' => true, 'weight' => 1, ), ), )

felipeelia commented 10 months ago

Hi @neilb400, thank you very much for sharing the report. I see you are an ElasticPress.io customer, is that right? If so, can you please open a ticket through your account's page on the elasticpress.io website? Through that we can fast-track your issue and also check our logs for queries. Thanks!

felipeelia commented 9 months ago

This was fixed in 5.0.2 via #3809.