Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oik-plugins.co.uk failure on 2021/01/28 #1

Open
bobbingwide opened this issue Jan 29, 2021 · 4 comments
Open

oik-plugins.co.uk failure on 2021/01/28 #1

bobbingwide opened this issue Jan 29, 2021 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jan 29, 2021

I'm raising this as an issue against something but I don't know what that something is yet.
On the 28th January I started looking at improving the performance of oik-plugins.co.uk.
I wanted:
a) to further test my slog-bloat routine and
b) to measure the effect of WooCommerce on the server response times.

Prior to activating WooCommerce I had made a number of changes for PageSpeed Insights and other recommendations:

  1. Updated .htaccess to prevent access to xmlrpc.php
  2. Installed Wordfence and its firewall
  3. Installed and configured autoptimize
  4. Updated .htaccess with changes applied by hummingbird-performance
  5. Updated plugins
  6. Improved some image file sizes

I then installed ( / reinstalled? ) WooCommerce at 4.9.2 and attempted to create a product.
Things started to go very wrong.

  • The php error log showed some Fatal errors occurring at 22:15
  • At 22:32 I noticed that one request had taken 600 seconds to complete.
/oik_sc_param/bw_pages-orderby-parameter/feed/,,600.744132,7.3.26,1736,5781,1146,54,1320,67,41,25,60,0.028146505355835,,,,17450,13.66.139.84,600.742743,2021-01-28T22:52:55+00:00,Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm),GET
  • Then the system stopped responding and the trace log went blank.
  • And to cap it all, a short while later, I lost the internet connection
  • The system was still buggered in the morning.
  • The trace file showed only 4 transactions running at 3:00:30
  • I started a chat with hosting.
  • They reset .htaccess to the bare minimum
  • They also tried to swtich to PHP 7.4 - up until this time it was 7.3.26
  • Switch was done around 08:02. It was switched back at 08:50.
  • 11:22 - After some mucking about I switched back to PHP 7.4.14

The mucking about involved.

  • 11:15 - Updating oik-block
  • 11:16 - Updating oik-blocks
  • 11:29 - Installing and activating oik-loader
  • 11:47 - reactivated WooCommerce

Now the site's working OK. .htaccess doesn't yet have the Hummingbird changes.

@bobbingwide bobbingwide added the help wanted Extra attention is needed label Jan 29, 2021
@bobbingwide bobbingwide self-assigned this Jan 29, 2021
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 29, 2021

user.ini updates

From:

; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)

[PHP]
display_errors = Off
max_execution_time = 100
max_input_time = 6000
max_input_vars = 1000
memory_limit = 1024M
post_max_size = 200M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php73"
upload_max_filesize = 4M
zlib.output_compression = Off

Variations I've seen

Field TSOhost SiteGround
max_execution_time 91-6000
max_input_time 90-6000
memory_limit 128-1024M
upload_max_filesize 4-8M

See https://core.trac.wordpress.org/ticket/22430 for notes on zlib.output_compression

Wordfence appends

; Wordfence WAF
auto_prepend_file = '/home/oikcouk/public_html/wordfence-waf.php'
; END Wordfence WAF

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 29, 2021

.htaccess updates

Disable xmlrpc.php

# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
<IfModule mod_authz_core.c>
	Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
	Order deny,allow
	Deny from all
</IfModule>
</Files>

TSOhost's PHP version selector

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Wordfence WAF

# Wordfence WAF
<Files ".user.ini">
<IfModule mod_authz_core.c>
	Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
	Order deny,allow
	Deny from all
</IfModule>
</Files>

# END Wordfence WAF

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 29, 2021

.htaccess doesn't yet have the Hummingbird changes.

These still to be re-applied.

.htaccess updates contd.

Hummingbird caching

# BEGIN WP-HUMMINGBIRD-CACHING
# The directives (lines) between "BEGIN WP-HUMMINGBIRD-CACHING" and "END WP-HUMMINGBIRD-CACHING" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0

<FilesMatch "\.(txt|xml|js)$">
ExpiresDefault A31536000
</FilesMatch>

<FilesMatch "\.(css)$">
ExpiresDefault A31536000
</FilesMatch>

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
ExpiresDefault A31536000
</FilesMatch>

<FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
ExpiresDefault A31536000
</FilesMatch>
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(txt|xml|js)$">
   Header set Cache-Control "max-age=31536000"
  </FilesMatch>

  <FilesMatch "\.(css)$">
   Header set Cache-Control "max-age=31536000"
  </FilesMatch>

  <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
   Header set Cache-Control "max-age=31536000"
  </FilesMatch>

  <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
   Header set Cache-Control "max-age=31536000"
  </FilesMatch>
</IfModule>
# END WP-HUMMINGBIRD-CACHING

Hummingbird GZIP

# BEGIN WP-HUMMINGBIRD-GZIP
# The directives (lines) between "BEGIN WP-HUMMINGBIRD-GZIP" and "END WP-HUMMINGBIRD-GZIP" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_deflate.c>
	SetOutputFilter DEFLATE
    <IfModule mod_setenvif.c>
        <IfModule mod_headers.c>
            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
        </IfModule>
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE "application/atom+xml" \
                                      "application/javascript" \
                                      "application/json" \
                                      "application/ld+json" \
                                      "application/manifest+json" \
                                      "application/rdf+xml" \
                                      "application/rss+xml" \
                                      "application/schema+json" \
                                      "application/vnd.geo+json" \
                                      "application/vnd.ms-fontobject" \
                                      "application/x-font-ttf" \
                                      "application/x-font-opentype" \
                                      "application/x-font-truetype" \
                                      "application/x-javascript" \
                                      "application/x-web-app-manifest+json" \
                                      "application/xhtml+xml" \
                                      "application/xml" \
                                      "font/eot" \
                                      "font/opentype" \
                                      "font/otf" \
                                      "image/bmp" \
                                      "image/svg+xml" \
                                      "image/vnd.microsoft.icon" \
                                      "image/x-icon" \
                                      "text/cache-manifest" \
                                      "text/css" \
                                      "text/html" \
                                      "text/javascript" \
                                      "text/plain" \
                                      "text/vcard" \
                                      "text/vnd.rim.location.xloc" \
                                      "text/vtt" \
                                      "text/x-component" \
                                      "text/x-cross-domain-policy" \
                                      "text/xml"

    </IfModule>
    <IfModule mod_mime.c>
        AddEncoding gzip              svgz
    </IfModule>
</IfModule>
# END WP-HUMMINGBIRD-GZIP

@bobbingwide
Copy link
Owner Author

  • The php error log showed some Fatal errors occurring at 22:15
[28-Jan-2021 22:15:30 UTC] PHP Warning:  include_once(/home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images-request.php): failed to open stream: No such file or directory in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 47
[28-Jan-2021 22:15:30 UTC] PHP Warning:  include_once(): Failed opening '/home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images-request.php' for inclusion (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 47
[28-Jan-2021 22:15:30 UTC] PHP Fatal error:  Uncaught Error: Class 'WC_Regenerate_Images_Request' not found in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php:49
Stack trace:
#0 /home/oikcouk/public_html/wp-includes/class-wp-hook.php(287): WC_Regenerate_Images::init('')
#1 /home/oikcouk/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /home/oikcouk/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#3 /home/oikcouk/public_html/wp-settings.php(557): do_action('init')
#4 /home/oikcouk/public_html/wp-config.php(101): require_once('/home/oikcouk/p...')
#5 /home/oikcouk/public_html/wp-load.php(37): require_once('/home/oikcouk/p...')
#6 /home/oikcouk/public_html/wp-admin/admin-ajax.php(22): require_once('/home/oikcouk/p...')
#7 {main}
  thrown in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 49
[28-Jan-2021 22:15:30 UTC] PHP Warning:  include_once(/home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/admin/plugin-updates/class-wc-plugin-updates.php): failed to open stream: No such file or directory in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 2212
[28-Jan-2021 22:15:30 UTC] PHP Warning:  include_once(): Failed opening '/home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/admin/plugin-updates/class-wc-plugin-updates.php' for inclusion (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 2212
[28-Jan-2021 22:15:30 UTC] PHP Fatal error:  Uncaught Error: Class 'WC_Plugin_Updates' not found in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php:2216
Stack trace:
#0 /home/oikcouk/public_html/wp-includes/class-wp-hook.php(287): wc_enable_wc_plugin_headers(Array)
#1 /home/oikcouk/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#2 /home/oikcouk/public_html/wp-includes/functions.php(6134): apply_filters('extra_plugin_he...', Array)
#3 /home/oikcouk/public_html/wp-admin/includes/plugin.php(86): get_file_data('/home/oikcouk/p...', Array, 'plugin')
#4 /home/oikcouk/public_html/wp-admin/includes/plugin.php(341): get_plugin_data('/home/oikcouk/p...', false, false)
#5 /home/oikcouk/public_html/wp-includes/class-wp-recovery-mode-email-service.php(299): get_plugins()
#6 /home/oikcouk/public_html/wp-includes/class-wp-recovery-mode-email-service.php(265): WP_Recovery_Mode_Email_Service->get_plugin(Array)
#7 /home/oikcouk/public_html/wp-includes/class-wp-recovery-mode-email-service.php(121): WP_ in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 2216
[28-Jan-2021 22:15:30 UTC] PHP Fatal error:  Uncaught Error: Class 'WC_Integration_MaxMind_Geolocation' not found in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-integrations.php:41
Stack trace:
#0 /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(579): WC_Integrations->__construct()
#1 /home/oikcouk/public_html/wp-includes/class-wp-hook.php(287): WooCommerce->init('')
#2 /home/oikcouk/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#3 /home/oikcouk/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#4 /home/oikcouk/public_html/wp-settings.php(557): do_action('init')
#5 /home/oikcouk/public_html/wp-config.php(101): require_once('/home/oikcouk/p...')
#6 /home/oikcouk/public_html/wp-load.php(37): require_once('/home/oikcouk/p...')
#7 /home/oikcouk/public_html/wp-admin/admin-ajax.php(22): require_once('/home/oikcouk/p...')
#8 {main}
  thrown in /home/oikcouk/public_html/wp-content/plugins/woocommerce/includes/class-wc-integrations.php on line 41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant