[wp-trac] [WordPress Trac] #52765: Fatal error: Maximum execution time exceeded in _upgrade_422_find_genericons_files_in_folder()

WordPress Trac noreply at wordpress.org
Wed Mar 10 18:06:42 UTC 2021


#52765: Fatal error: Maximum execution time exceeded in
_upgrade_422_find_genericons_files_in_folder()
-----------------------------+-----------------------------
 Reporter:  bobbingwide      |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:
 Severity:  minor            |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 When `_upgrade_422_remove_genericons()` was written I don't suppose anyone
 was developing WordPress plugins or themes using node.

 Today, I updated a local install of WordPress from 5.6 to 5.7
 It timed out after 319 seconds with

 PHP Fatal error:  Maximum execution time of 300 seconds exceeded in
 C:\apache\htdocs\cwiccer\wp-admin\includes\update-core.php on line 1553.

 I analysed the problem here

 https://github.com/bobbingwide/bobbingwide/issues/11

 and recreated the issue.

 The logic in ` _upgrade_422_find_genericons_files_in_folder()` was called
 over 70,000 times. The elapsed time was 322 seconds.

 **Explanation**

 In this installation I had the development source for over a dozen block
 plugins.

 **Proposed fix**
 Is it still necessary to call `upgrade_422_remove_genericons()`?

 If not, remove it.
 If so, reduce the number of directories to be searched.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52765>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list