10up / ElasticPress

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

WordPress white screen when deactivating plugin during CLI indexing operation #1977

Closed ChrisWiegman closed 3 years ago

ChrisWiegman commented 3 years ago

Describe the bug

If an indexing operation is underway via WP-CLI, disabling and removing the plugin can lead to a fatal error on the WordPress site.

Steps to Reproduce

(replicated on the WP Engine platform)

  1. Initiate an idexing operation via WP-CLI
  2. Deactivate and remove the ElasticPress plugin while the index is still running
  3. Check site and view a white screen (usually only for the first page load)

Expected behavior

  1. Removing the plugin should allow for graceful failure in all operations.

Screenshots

N/A

Environment information

version: 5.5.3 site_language: en_US user_language: en_US timezone: America/New_York permalink: /%year%/%monthnum%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 0 default_comment_status: open environment_type: production user_count: 17511 dotorg_communication: true

wp-paths-sizes

wordpress_path: /nas/content/live/ecom150784 wordpress_size: 348.94 MB (365891617 bytes) uploads_path: /nas/content/live/ecom150784/wp-content/uploads uploads_size: 1.41 GB (1511032026 bytes) themes_path: /nas/content/live/ecom150784/wp-content/themes themes_size: 16.41 MB (17206251 bytes) plugins_path: /nas/content/live/ecom150784/wp-content/plugins plugins_size: 92.44 MB (96929315 bytes) database_size: 887.13 MB (930217984 bytes) total_size: 2.72 GB (2921277193 bytes)

wp-dropins (1)

advanced-cache.php: true

wp-active-theme

name: Storefront (storefront) version: 2.8.0 (latest version: 2.9.0) author: Automattic author_website: https://woocommerce.com/ parent_theme: none theme_features: core-block-patterns, post-thumbnails, automatic-feed-links, custom-logo, menus, html5, custom-background, custom-header, site-logo, title-tag, customize-selective-refresh-widgets, wp-block-styles, align-wide, editor-styles, editor-font-sizes, editor-style, responsive-embeds, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, starter-content, widgets, infinite-scroll theme_path: /nas/content/live/ecom150784/wp-content/themes/storefront auto_update: Disabled

wp-themes-inactive (5)

StoreOne: version: 2.1.4, author: ThemeFarmer,Auto-updates disabled Twenty Fifteen: version: 2.7, author: the WordPress team,Auto-updates disabled Twenty Fourteen: version: 2.9, author: the WordPress team,Auto-updates disabled Twenty Seventeen: version: 2.4, author: the WordPress team,Auto-updates disabled Twenty Sixteen: version: 2.2, author: the WordPress team,Auto-updates disabled

wp-mu-plugins (4)

Force Strong Passwords - WPE Edition: version: 1.6.4, author: Jason Cosper WP Engine Seamless Login Plugin: version: 1.5.5, author: WP Engine WP Engine Security Auditor: version: 1.0.9, author: wpengine WP Engine System: version: 4.0.0, author: WP Engine

wp-plugins-active (13)

Debug Bar: version: 1.1, author: wordpressdotorg (latest version: 1.1.2), Auto-updates disabled Debug Bar ElasticPress: version: 1.4, author: 10up, Auto-updates disabled ElasticPress: version: 3.5.1, author: 10up, Auto-updates disabled iThemes Security: version: 7.9.0, author: iThemes, Auto-updates disabled Jetpack by WordPress.com: version: 9.0.2, author: Automattic (latest version: 9.1), Auto-updates disabled Query Monitor: version: 3.6.4, author: John Blackbourn (latest version: 3.6.5), Auto-updates disabled WooCommerce: version: 4.6.1, author: Automattic (latest version: 4.7.0), Auto-updates disabled WooCommerce Google Analytics Integration: version: 1.4.24, author: WooCommerce, Auto-updates disabled WooCommerce Random Product Sorting with Pagination: version: 0.9.2, author: William Crowley, Auto-updates disabled WooCommerce Smooth Generator: version: 1.0.0, author: Automattic, Auto-updates disabled WooCommerce Stripe Gateway: version: 4.5.3, author: WooCommerce (latest version: 4.5.5), Auto-updates disabled WooSpeed by WP Engine: version: 0.0.1, author: WP Engine, Auto-updates disabled Yoast SEO: version: 15.2, author: Team Yoast (latest version: 15.3), Auto-updates disabled

wp-plugins-inactive (2)

Web Vitals Tracking: version: 1.0.1, author: Enrico Atzeni, Auto-updates disabled WooCommerce Custom Orders Table: version: 1.0.0-rc3, author: Liquid Web, Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 50M max_effective_size: 50 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 38 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 gd_version: 2.2.5 ghostscript_version: unknown

wp-server

server_architecture: Linux 5.4.0-1024-gcp x86_64 httpd_software: Apache php_version: 7.4.10 64bit php_sapi: apache2handler max_input_variables: 10000 time_limit: 3600 memory_limit: 512M max_input_time: 3600 upload_max_filesize: 50M php_post_max_size: 100M curl_version: 7.58.0 OpenSSL/1.1.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 5.7.31-34-log client_version: mysqlnd 7.4.10

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /nas/content/live/ecom150784/wp-content WP_PLUGIN_DIR: /nas/content/live/ecom150784/wp-content/plugins WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: utf8_unicode_ci

wp-filesystem

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

jetpack

site_id: 175424703 ssl_cert: No time_diff: undefined version_option: 9.0.2:1603896035 old_version: 8.9.1:1601902099 public: Public master_user: #12413 chriswiegman current_user: #12413 chriswiegman tokens_set: Blog User blog_token: g@x!leEriVJ%sv)OfrybTt&(i9zF4Ucl user_token: D(Bo^pz8pBj4TvG$4%txCoXWXFEkZk version: 9.0.2 jp_plugin_dir: /nas/content/live/ecom150784/wp-content/plugins/jetpack/ plan: free protect_header: {"trusted_header":"REMOTE_ADDR","segments":1,"reverse":false} full_sync: {"started":"Mon, 06 Apr 2020 16:02:49 +0000","finished":"Mon, 06 Apr 2020 16:03:15 +0000","progress":{"options":{"finished":true},"functions":{"finished":true},"constants":{"finished":true},"users":{"total":"1","sent":1,"finished":true,"last_sent":"12413"}},"config":{"options":true,"functions":true,"constants":true,"users":[12413]}} sync_size: 2 sync_lag: 0 seconds full_sync_size: undefined full_sync_lag: 0 seconds idc_urls: {"home":"https:\/\/ecom150784.wpenginedev.com","siteurl":"https:\/\/ecom150784.wpenginedev.com","WP_HOME":"","WP_SITEURL":""} idc_error_option: false idc_optin: true cxn_tests: {"12":{"name":"test__sync_health","label":"Jetpack has detected an error syncing your site.","short_description":"Jetpack has detected an error while syncing your site. We recommend a full sync to align Jetpack with your site data.","long_description":"

The information synced by Jetpack ensures that Jetpack Search, Related Posts and other features are aligned with your site\u2019s current content.<\/p>

<span class=\"dashicons fail\"><span class=\"screen-reader-text\">Error<\/span><\/span> Jetpack has detected an error while syncing your site. We recommend <a id=\"full_sync_request_link\" href=\"#\">a full sync<\/a> to align Jetpack with your site data.<\/strong><\/p>","severity":"critical","action":"https:\/\/jetpack.com\/redirect\/?source=jetpack-contact-support&site=ecom150784.wpenginedev.com","action_label":"Contact Jetpack Support","show_in_site_health":true,"pass":false,"group":["default"],"type":"direct"}}

`

Additional context

Rahmon commented 3 years ago

Hi @ChrisWiegman .

Sorry for the late response here. I'll investigate this bug in the next few days and how we can achieve the expected behavior.

Rahmon commented 3 years ago

Hi @ChrisWiegman .

I followed the steps you wrote but I was not able to reproduce this bug. Can you please test if this error happens in version 3.5.4?

ChrisWiegman commented 3 years ago

I've gone back and have been unable to reproduce again. Feel free to close this. If I see it again I can re-open.

felipeelia commented 3 years ago

Closing this one out. Thanks @ChrisWiegman!