Title: Max execution time errors
Last modified: November 22, 2023

---

# Max execution time errors

 *  Resolved [netzenrob](https://wordpress.org/support/users/netzenrob/)
 * (@netzenrob)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/max-execution-time-errors/)
 * hello,
 * Trying to fix a scan error that complains about max execution time of 30 seconds
   and scan won’t complete. Our max execution time on php is set to 180 secs see:
   [https://vintagerockmag.com/info.php](https://vintagerockmag.com/info.php)
 * Any ideas?
 * Thanks
 * Rob
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmax-execution-time-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [wfmark](https://wordpress.org/support/users/wfmark/)
 * (@wfmark)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/max-execution-time-errors/#post-17221504)
 * Hi [@netzenrob](https://wordpress.org/support/users/netzenrob/), thanks for getting
   in touch!
 * Sometimes, a higher max_execution_time value has been found to be detrimental
   to scan speed. We have seen issues arise when this number exceeds 60, although
   Wordfence will only attempt to use half of this value by default. Please try 
   changing that number before trying the following so I can get the information
   I need to help you.
    - Stop the existing scan if it is still running (The “Start New Scan” button
      turns into a “Stop” button while the scan is running).
    - Go to your Wordfence > Scan > Manage Scan and locate the “Performance Options”
      section. Set “Maximum execution time for each scan stage” to 20.
    - Click to “Save Changes”.
    - Go to the Tools > Diagnostics page.
    - In the “Debugging Options” section check the circle “Enable debugging mode”.
    - 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.
 * On some sites, this will correct the issue. Adding “20” for the **“Maximum execution
   time for each scan stage”** tells the scan to pause every 20 seconds and start
   again where it left off, which makes the scan more performance-friendly for some
   servers. If this fixes the issue and scans run again, you can leave all the settings
   above except for “Enable Debugging Mode”.
 * For a screenshot of my recommended Performance setting options – [Click Here](https://www.wordfence.com/wp-content/uploads/2021/09/maxexescanperformance.png).
 * Additionally, please send us a diagnostic report to **wftest@ wordfence.com**.
   You can find the link to do so at the top of the **Wordfence > Tools > Diagnostics
   pag**e. There, click on “**Send Report by Email**”. Please add your forum username
   where indicated and respond here after you have sent it.
 * Thanks,
 * Mark.

Viewing 1 replies (of 1 total)

The topic ‘Max execution time errors’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wfmark](https://wordpress.org/support/users/wfmark/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/max-execution-time-errors/#post-17221504)
 * Status: resolved