Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#46066 closed enhancement (invalid)

Only pause plugins/themes for persistent errors

Reported by: schlessera's profile schlessera Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Site Health Keywords: has-patch servehappy
Focuses: Cc:

Description

To avoid pausing plugins/themes through the fatal error protection because of random one-off errors, we should do a redirect first and see whether the error persists. If not, there's no need to pause the plugin/theme, it was just a temporary issue.

This ties into #45940, as it will further reduce the amount of pausing that we do.

Attachments (1)

46066.diff (6.8 KB) - added by schlessera 6 years ago.

Download all attachments as: .zip

Change History (10)

@schlessera
6 years ago

#1 @schlessera
6 years ago

This first patch changes the 'error' array that we store into a 'record' array that contains both the 'error' and a 'count'.

There's a define WP_FATAL_ERROR_PROTECTION_REDIRECT_THRESHOLD that defaults to 2.

A plugin/theme is only paused if the consecutive count of the same error happening after redirects reaches said threshold.

To discuss:

  • Do we need such a constant?
  • Do we need to count the number of redirects and make sure we're not doing an infinite loop?

#2 @flixos90
6 years ago

  • Keywords servehappy added

This ticket was mentioned in Slack in #core-php by schlessera. View the logs.


6 years ago

#4 @flixos90
6 years ago

  • Milestone changed from 5.1 to 5.2

#5 @flixos90
6 years ago

  • Priority changed from high to normal

This ticket was mentioned in Slack in #core-php by schlessera. View the logs.


6 years ago

#7 @flixos90
6 years ago

  • Milestone changed from 5.2 to 5.3

#8 @flixos90
6 years ago

  • Milestone 5.3 deleted
  • Resolution set to invalid
  • Status changed from new to closed

This ticket is based on the old fatal error recovery mode implementation and will be covered as part of #46130.

#9 @spacedmonkey
5 years ago

  • Component changed from Bootstrap/Load to Site Health
Note: See TracTickets for help on using tickets.