• Wordfence: 7.11.7
    WordPress: 6.7.1
    Linux Server running Apache and FPM-FCGI.
    PHP memory_limit: 2048M
    PHP max_execution_time: 600
    PHP version: 8.3.8
    WP_MEMORY_LIMIT = 40M
    WP_MAX_MEMORY_LIMIT = 2048M

    Below is the tail-end of the log before it just died:

    [Nov 21 12:23:32] Scanning contents: wp-content/plugins/updraftplus/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p13/Vcs/GitHubApi.php (Size: 12.93 KB Mem: 34 MB)
    [Nov 21 12:23:32] Scanning contents: wp-content/plugins/elementor-pro/modules/floating-buttons/classes/render/contact-buttons-var-3-render.php (Size: 9.38 KB Mem: 34 MB)
    [Nov 21 12:23:32] Scanning contents: wp-content/plugins/updraftplus/vendor/rackspace/php-opencloud/lib/OpenCloud/ObjectStore/Upload/ContainerMigration.php (Size: 5.57 KB Mem: 34 MB)
    [Nov 21 12:23:33] Forking during malware scan (10119) to ensure continuity.
    [Nov 21 12:23:33] Entered fork()
    [Nov 21 12:23:33] Calling startScan(true)
    [Nov 21 12:23:33] Got value from wf config maxExecutionTime: 20
    [Nov 21 12:23:33] getMaxExecutionTime() returning config value: 20
    [Nov 21 12:23:33] Cached result for scan start test: true
    [Nov 21 12:23:33] Starting cron with normal ajax at URL https://example.com/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=custom&cronKey=b4845118a3…594&signature=ab4e8834d04b…c1dec4
    [Nov 21 12:23:34] Scan process ended after forking.

    I’m revisiting this as it’s been about a month since I made some changes and wanted to see how it affected things. I went through and changed all our sites from high sensitivity to normal. This knocked down the issue about 60% but we still have quite a few still failing to scan.

    I had previously worked with @wfmargaret and tried a few suggestions they had. I set “Maximum execution time for each scan stage” to 20 and it still fails. I’m testing with a site that is very small, maybe 10 pages and 20 posts, altogether the site is only 300mb in size. Yet wordfence still is unable to complete it’s scan on the site. The last suggestion wfmargaret had was regarding a reverse proxy or a CDN. But when i reached out to Nexcess they checked logs and were unable to find anything.

    So at this point I’m kinda stuck as no one can see anything in the logs and we continue to have issues with wordfence. I sent off the diagnostic report along with the scan activity log, so you should be able to see some details. If you need anything more please let me know.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @gmariani405, thanks for getting back in touch with us.

    I’ve spoken to Margaret, and she’s shown me the diagnostics/error/access log you sent over from that time. I think it would be appropriate to get an updated access log and activity log now that some time has passed. I’m glad things have improved somewhat, but every scan hit recorded in the previous access log gave a 200 response. The one that failed after forking shown above didn’t seem to be there, or wasn’t reflecting errors in the logs at that time to coincide with the scan failures.

    Feel free to also send a fresh copy of its diagnostics (also to reflect any changes made in the last month) to wftest @ wordfence . com as before, using your forum username so we can identify the emails. Please also include your username in the subject of any separate emails you send containing your error logs and let us know here once you’ve sent them.

    Many thanks,
    Peter.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @gmariani405,

    I just noticed you had sent a diagnostic after all but hadn’t posted here since, although I haven’t seen an updated error log to see if there are any non-200 responses. I have noticed there appear to be no detected scan issues at the time that diagnostic was sent.

    I notice your max_execution_time = 600 in php.ini. We have noticed problems when numbers are set higher than 60, or when it’s 0 – which effectively means “no limit”. Wordfence only ever attempts to use half of the value set here, so it would be good to change to max_execution_time = 60 to see if the scan continues.

    Also, check Wordfence > Scan > Manage Scan and locate the “Performance Options” section. Set “Maximum execution time for each scan stage” to 20 if it isn’t already.

    I also see that your WP_MAX_MEMORY_LIMIT is high, but WP_MEMORY_LIMIT is only 40M. It may be a good idea to change this to 256M or 512M in wp-config.php.

    Try running a fresh scan after changing the above and let us know how you get on!

    Thanks again,
    Peter.

    Thread Starter gmariani405

    (@gmariani405)

    @wfpeter Thanks for following up, honestly it’s hard juggling support tickets with lots of different vendors, especially during the holidays i kinda lost track of this. I’ll give those a shot and let you know if i make any progress.

    Plugin Support wfpeter

    (@wfpeter)

    It’s no problem @gmariani405, sometimes when topics are inactive it’s because a first suggestion will work, or a solution will be found by the customer while troubleshooting. I always check for diagnostics in our inbox before closing and noticed yours.

    Thanks again,
    Peter.

    Thread Starter gmariani405

    (@gmariani405)

    I did a test run:
    – “Maximum execution time for each scan stage” was already set to 20 so that was no change
    – WP_MEMORY_LIMIT – I set this to 256M
    – max_execution_time – I set this to 60

    Did a scan with the execution time to 60, it failed. Did a scan with both the execution time and memory limit set, failed again. This is with all plugins updated and wordpress on 6.7.1 and wordfence on 8.0.1. Let me know if you want me to try anything else.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @gmariani405,

    This does seem strange as there seemed to be no failures of other checks in your diagnostic. Did the most recent scan log provide a specific reason or just terminate with no further messages?

    • Go to the Tools > Diagnostics page.
    • In the “Debugging Options” section check the circle “Enable debugging mode” if you haven’t already.
    • If “Start scan remotely” is checked, uncheck this option.
    • Click to “Save Changes”.
    • Start a new scan on the Scan page.
    • If the scan fails again, copy the last 20 lines or so from the Log (click the “Show Log” link) once the scan finishes and paste them in the post.

    If you do have an error log that covers the time of the scan, you’re more than welcome to send that to wftest @ wordfence . com too, but please include your username in the subject so I can find it.

    Thanks again,
    Peter.

    Thread Starter gmariani405

    (@gmariani405)

    • “Debugging Options” – already checked
    • “Start scan remotely” – already unchecked
    • Left the other settings the same from the previous test
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/modern-events-calendar-lite/app/api/addons-api/mec-extra-content/social-poster-addon.svg (Size: 4.42 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/updraftplus/includes/handlebars/handlebars.runtime.js (Size: 73.17 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanned contents of 5985 additional files at 21.56 per second
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/elementor-pro/modules/display-conditions/conditions/base/date-condition-base.php (Size: 2.45 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/modern-events-calendar-lite/app/api/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.php (Size: 2.66 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/elementor-pro/core/app/assets/js/ui/connect-button.js (Size: 956 B Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/modern-events-calendar-lite/app/api/Twilio/Rest/Preview/Sync/ServiceInstance.php (Size: 5.51 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/modern-events-calendar-lite/app/api/Twilio/Rest/FrontlineApi/V1/UserPage.php (Size: 1.57 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/elementor-pro/vendor_prefixed/php-di/phpdoc-reader/src/PhpDocReader/AnnotationException.php (Size: 197 B Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/modern-events-calendar-lite/app/core/puc/Puc/v4p11/DebugBar/Panel.php (Size: 5.17 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/updraftplus/addons/morefiles.php (Size: 56.17 KB Mem: 34 MB)
    [Dec 12 10:25:00] Scanning contents: wp-content/plugins/updraftplus/vendor/composer/autoload_real.php (Size: 1.58 KB Mem: 34 MB)
    [Dec 12 10:25:01] Forking during malware scan (13068) to ensure continuity.
    [Dec 12 10:25:01] Entered fork()
    [Dec 12 10:25:01] Calling startScan(true)
    [Dec 12 10:25:01] Got value from wf config maxExecutionTime: 20
    [Dec 12 10:25:01] getMaxExecutionTime() returning config value: 20
    [Dec 12 10:25:01] Cached result for scan start test: true
    [Dec 12 10:25:01] Starting cron with normal ajax at URL https://example.com/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=custom&cronKey=56f6e08ecc008f55025963424dcb5ad6&signature=c81f34a0b2aaa106821bbab03b0ad6106222357ba6b8782aaa2ba0aaece10919
    [Dec 12 10:25:04] Scan process ended after forking.

    It ends with this message:

    Scan Stage Failed
    
    A scan stage has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself. Wordfence will make up to 2 attempts to resume each failed scan stage. This scan may recover if one of these attempts is successful. Click here for steps you can try. (opens in new tab)

    The only error messages are from a known bug i reported to Elementor already ( https://github.com/elementor/elementor/issues/25836 ):

    [12-Dec-2024 13:11:37 UTC] PHP Warning:  Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 226
    [12-Dec-2024 13:11:37 UTC] PHP Warning: Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 233
    [12-Dec-2024 13:11:37 UTC] PHP Warning: Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 238
    [12-Dec-2024 13:11:37 UTC] PHP Warning: Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 244
    [12-Dec-2024 13:11:37 UTC] PHP Warning: Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 250
    [12-Dec-2024 13:11:37 UTC] PHP Warning: Attempt to read property "ID" on null in /chroot/home/html/wp-content/plugins/elementor-pro/modules/posts/skins/skin-content-base.php on line 271
    Thread Starter gmariani405

    (@gmariani405)

    @wfpeter tagging you just in case you didn’t see my previous reply.

    Thread Starter gmariani405

    (@gmariani405)

    @wfpeter trying one last time before starting another thread

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Scan Time Limit Exceeded 2’ is closed to new replies.