Make WordPress Core

Opened 2 years ago

Closed 23 months ago

Last modified 19 months ago

#46066 closed enhancement (invalid)

Only pause plugins/themes for persistent errors

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


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 2 years ago.

Download all attachments as: .zip

Change History (10)

2 years ago

#1 @schlessera
2 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
2 years ago

  • Keywords servehappy added

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

2 years ago

#4 @flixos90
2 years ago

  • Milestone changed from 5.1 to 5.2

#5 @flixos90
2 years ago

  • Priority changed from high to normal

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

2 years ago

#7 @flixos90
23 months ago

  • Milestone changed from 5.2 to 5.3

#8 @flixos90
23 months 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
19 months ago

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