TL;DR:
Try again at a later time. Your issue may be Wordfence scanning while the use of other resources running your blog cause the Wordfence scan to exceed its max limit.
EDIT: There’s also a setting in Wordfence (https://docs.wordfence.com/en/My_scans_don%27t_finish._What_would_cause_that%3F). A Maximum execution time for each scan stage setting is toward the bottom of the Wordfence Options page.
The info text there says, “Blank for default. Must be greater than 7 and 10-20 or higher is recommended for most servers.” Obviously if you’re timing out at 30 seconds and you’ve tried re-running your scan (or repeating whatever action caused your PHP error in Wordfence) then you may consider increasing this number above 30.
DETAILS
I’m showing up a little late on this conversation, and my error was similar
Maximum execution time of 30 seconds exceeded in … /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php on line 758
I took a look at the Wordfence Doc & Guides (https://docs.wordfence.com/en/Wordfence_options) and noticed that the only mention of ‘Max execution time’ is in the section about Maximum execution time for each scan stage so I reasoned the issue may be related to Wordfence exceeding its time limit when both it and other blog resources cause the Wordfence scan to run too slow. After reading this bit in WF Doc & Guides I repeated the action that caused my error and it worked with no error.
Best wishes.
-
This reply was modified 7 years, 1 month ago by geoconklin. Reason: added resources
-
This reply was modified 7 years, 1 month ago by geoconklin.