Title: Infinite loop
Last modified: November 21, 2025

---

# Infinite loop

 *  [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/)
 * Hi there,
 * My scan ends with the error “Scan terminated with error: Wordfence file scanner
   detected a possible infinite loop”. How can I troubleshoot it?
 * I have sent you a report by e-mail.
 * Best Regards,
   Peter (@pstidsen)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/infinite-loop-25/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/infinite-loop-25/page/2/?output_format=md)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18728656)
 * Hi [@pstidsen](https://wordpress.org/support/users/pstidsen/), thanks for reaching
   out!
 * There are certainly a few pieces of information that’d be good for me to check
   in this case.
    - Go to the **Wordfence > Tools > Diagnostics** page
    - In the “Debugging Options” section, check “Enable debugging mode”
    - Click to “Save Changes”.
    - **CANCEL** any current scan and start a **NEW** scan
    - Copy the last 20 lines from the Log (click the “Show Log” link) or so of the
      activity log once the scan **finishes** and paste them in this post.
 * This will help us see exactly what is happening when the scan fails or ends.
 * It’d also be good to grab a diagnostic report so we can see the configuration
   on top of the scan logs. You can send that to **wftest @ wordfence . com** by
   finding the link at the top of the **Wordfence > Tools > Diagnostics** page. 
   Then click on **“Send Report by Email”**. Please add your forum username where
   indicated and _respond here after you have sent it._
 * **NOTE:** It should look as follows – Screenshot of [Tools > Diagnostic > Send by Email](https://www.wordfence.com/wp-content/uploads/2021/09/diagnosticsendbyemail.png)
 * Thanks,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18730008)
 *     ```wp-block-code
       [Nov 24 07:36:52:1763966212.239170:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=timestamp[Nov 24 07:36:35:1763966195.096172:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=timestamp[Nov 24 07:35:26:1763966126.024787:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/stats.json[Nov 24 03:23:34:1763951014.740836:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=aggregate_stats[Nov 23 21:36:22:1763930182.034221:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-64x64.jpg (Mem:262.0M)[Nov 23 21:36:22:1763930182.018344:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-600x600.jpg (Mem:262.0M)[Nov 23 21:36:22:1763930182.000430:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-590x590.jpg.webp (Mem:262.0M)[Nov 23 21:36:21:1763930181.988865:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-590x590.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.977214:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-510x510.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.965940:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-300x300.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.953971:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-300x300.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.943059:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-290x290.jpg.webp (Mem:262.0M)[Nov 23 21:36:21:1763930181.931211:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-290x290.bk.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.919464:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-225x225.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.906179:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-150x150.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.894079:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-1024x1024.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.880591:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-1024x1024.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.869329:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-100x100.jpg.webp (Mem:262.0M)[Nov 23 21:36:21:1763930181.856837:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-100x100.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.844638:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2393-1-100x100.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.832201:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.819228:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.807287:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-768x768.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.794198:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-768x768.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.778410:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-64x64.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.765220:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-600x600.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.746302:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-590x590.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.723727:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-510x510.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.712639:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-300x300.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.701675:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-300x300.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.689610:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-290x290.bk.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.678423:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-225x225.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.664624:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.653016:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.641532:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-768x768.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.627767:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-768x768.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.616056:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-64x64.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.604512:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-600x600.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.593564:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-590x590.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.581541:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-510x510.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.569289:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-300x300.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.556936:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-300x300.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.545689:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-290x290.bk.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.533810:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-225x225.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.522621:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-150x150.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.510593:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-1024x1024.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.499402:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-1024x1024.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.487273:2:info] Analyzed 152800 files containing 6.92 GB of data so far[Nov 23 21:36:21:1763930181.485797:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-100x100.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.472707:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-2-2-100x100.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.461045:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-150x150.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.446330:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1024x1024.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.434624:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1024x1024.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.422719:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-100x100.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.411739:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-100x100.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.398375:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.386452:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1.bk.optm.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.366566:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1-768x768.jpg (Mem:262.0M)[Nov 23 21:36:21:1763930181.352186:4:info] Scanning: /var/www/www.liestmanns.dk/www/wp-content/uploads/2022/07/CB2392-1-768x768.bk.jpg (Mem:262.0M)
       ```
   
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18730011)
 * Deagnostic report sent. Here’s a screenshot of the final error: [https://app.screencast.com/G4QlwJwAEp8eA](https://app.screencast.com/G4QlwJwAEp8eA)
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18734147)
 * Any idea on what to try?
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18735066)
 * Hi [@pstidsen](https://wordpress.org/support/users/pstidsen/), thanks for your
   patience.
 * Firstly, I see your local value for `max_execution_time = 0`, which is effectively
   unlimited timeout. Ideally this should be set to a value of `30`or `60` as Wordfence
   only tries to use half of this value by default. You may be able to change that
   in your server/hosting settings or by altering **php.ini** if it’s available 
   to you.
 * Your diagnostics show the server is using `lsapi V8.1 CloudLinux 1.3`, which 
   is the Litespeed module for Apache. For that reason, it’s worth trying the `noabort`
   code here to prevent scans randomly terminating: [https://www.wordfence.com/help/advanced/system-requirements/litespeed/](https://www.wordfence.com/help/advanced/system-requirements/litespeed/)
 * It may also be worth setting **Wordfence > All Options > Performance Options 
   > Maximum execution time for each scan stage** to a number like `8` and check“**
   Use low resource scanning**” to help spread the scan out a bit more, or keep 
   memory usage for each hit lower. Don’t forget to save changes there after you’re
   done.
 * Let us know how you get on,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18735437)
 * Hi Peter,
   Thanks for your reply!
 * I was actually already using the first LiteSpeed code block (the `<IfModule rewrite_module
   >`-one). I have now tried to use the second code block instead. Likewise, I was
   also already using “Low resource scanning”.
 * Furthermore, I have set `max_execution_time = 60` in the .htaccess file.
 * I have changed “Maximum execution time for each scan stage” from 15 to 8.
 * Now running scan again..
 * Best Regards,
   Peter
    -  This reply was modified 6 months, 2 weeks ago by [pstidsen](https://wordpress.org/support/users/pstidsen/).
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18735881)
 * Let us know how you get on [@pstidsen](https://wordpress.org/support/users/pstidsen/).
 * I did see somebody on `lsapi V8.1 CloudLinux 1.3` before where the host had limited
   I/O and CPU _time_ to a level where reducing the scan settings and running in
   low resource mode was unfortunately not enough. In most cases though, hosts limit
   the I/O _speed_ or CPU _usage_ instead so those changes should hopefully be effective.
 * Many thanks,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months, 1 week ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18738989)
 * Hi Peter,
 * Unfortunately, the scan has failed again.
 * I have asked the host about the limitation. Here’s the last lines from the log.(“**
   Scan terminated with error: Wordfence file scanner detected a possible infinite
   loop. Exiting on file:**” is marked with red).
 *     ```wp-block-code
       [Dec 02 08:21:14:1764660074.127636:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/stats.json[Dec 02 06:13:24:1764652404.806680:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=aggregate_stats[Dec 02 04:39:08:1764646748.636566:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=aggregate_stats[Dec 02 01:46:02:1764636362.006581:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=aggregate_stats[Dec 01 19:53:14:1764615194.256920:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=aggregate_stats[Dec 01 18:58:07:1764611887.759441:4:info] Scan process ended after forking.[Dec 01 18:58:07:1764611887.745060:10:info] SUM_KILLED:Previous scan terminated with an error. See below.[Dec 01 18:58:07:1764611887.744635:2:error] Scan terminated with error: Wordfence file scanner detected a possible infinite loop. Exiting on file:[Dec 01 18:58:07:1764611887.152591:4:info] Calling Wordfence API v2.27:https://noc1.wordfence.com/v2.27/?k=c7547aa331e03bee4155f5f25b3fcf35b66f704493a62ec6c19874b85359d7700dfd3238a0084bb7a8fe60c133bc0c13ceecce3245b7c2d3263ff8e599af5ab2&s=eyJ3cCI6IjYuOC4zIiwid2YiOiI4LjEuMiIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC9saWVzdG1hbm5zLmRrIiwic3NsdiI6MjY5NDg4NTExLCJwdiI6IjguMy4yNiIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI4LjE0LjEiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xdyIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiI4LjAuNDMtMzQiLCJsYW5nIjoiZGFfREsifQ&action=record_scan_metrics[Dec 01 18:58:07:1764611887.148616:4:info] Got a true deserialized value back from 'wfsd_engine' with type: object[Dec 01 18:58:07:1764611887.102079:4:info] Setting up scanRunning and starting scan[Dec 01 18:58:07:1764611887.101811:4:info] Setting up error handling environment[Dec 01 18:58:07:1764611887.101513:4:info] Requesting max memory[Dec 01 18:58:07:1764611887.098843:4:info] Checking saved cronkey against cronkey param[Dec 01 18:58:07:1764611887.098607:4:info] Checking cronkey: 3c181416dedc95bf6e0b9a8285e2d1fb (expecting 3c181416dedc95bf6e0b9a8285e2d1fb)[Dec 01 18:58:07:1764611887.098329:4:info] Fetching stored cronkey for comparison.[Dec 01 18:58:07:1764611887.097953:4:info] Verifying start request signature.[Dec 01 18:58:07:1764611887.097460:4:info] Scan engine received request.[Dec 01 18:58:06:1764611886.833765:4:info] Starting cron with normal ajax at URL https://liestmanns.dk/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=custom&cronKey=3c181416dedc95bf6e0b9a8285e2d1fb&signature=c19aa000fd5d616e1b2905689a1c35231fc15f0bab0299f646ca294bfaec1cdd[Dec 01 18:58:06:1764611886.833006:4:info] Cached result for scan start test: true[Dec 01 18:58:06:1764611886.832668:4:info] getMaxExecutionTime() returning config value: 8[Dec 01 18:58:06:1764611886.832331:4:info] Got value from wf config maxExecutionTime: 8[Dec 01 18:58:06:1764611886.831149:4:info] Calling startScan(true)[Dec 01 18:58:06:1764611886.641835:4:info] Entered fork()
       ```
   
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months, 1 week ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18740032)
 * Hi [@pstidsen](https://wordpress.org/support/users/pstidsen/), thanks for trying
   that and providing the logs.
 * Symlinks _could_ be a possible factor with an infinite loop, but I’m wondering
   if the I/O issue we mentioned before could be involved. We’ve taken a look and
   think it’s worth adjusting some more scan settings to see if they’ll help:
    - Set Wordfence’s **Maximum execution time for each scan stage** back to 15–
      20 seconds.
    - Exclude cache paths in **Wordfence > All Options > Advanced Scan Options >
      Exclude files from scan that match these wildcard patterns**: `wp-content/
      cache/*`, `wp-content/litespeed/*`, `wp-content/wp-rocket-config/*`
    - Consider disabling **Wordfence > All Options > General Options > Scan images,
      binary, and other files as if they were executable**.
    - Set a reasonable overall scan time limit in **Performance Options** at ~3 
      hours, rather than 2 days.
    - Clear WP Rocket and LiteSpeed caches before starting the next scan.
 * Keep “Low resource scanning” on for now, as it could be helping.
 * Thanks again,
   Peter.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18750976)
 * Hi [@pstidsen](https://wordpress.org/support/users/pstidsen/),
 * I was just wondering if any of those settings changes were able to assist on 
   your host? I have seen a few cases regarding `lsapi...` servers in recent weeks,
   but some may be heavily I/O or CPU limited.
 * Thanks again,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18751616)
 * Hi Peter,
 * Thanks for your reply again. Actually, I have not tried again until now. The 
   scan is running with new settings! The host refuses to acknowledge that there
   are relevant limitations. They say:
 * > Hi,
   > You can try increasing max_execution_time and memory limit in the .htaccess
   > file on the webhost.
   > These are among the variables you can play with for the
   > site 🙂The only thing we limit is the CPU and memory ceiling of 4 CPUs and 
   > 4 GB RAM.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18752655)
 * Hi [@pstidsen](https://wordpress.org/support/users/pstidsen/),
 * It’s great news the scan is running with the new settings. I appreciate you checking
   in with your host too. I didn’t know for sure if they’d be limiting I/O or CPU
   but we had seen it in other cases with `lsapi...` servers when the host was unknown(
   to us), so I couldn’t say for sure if you were going to face the same issue.
 * Our only differing recommendation is that the `max_execution_time` doesn’t exceed`
   60` because contrary to the belief a longer time would improve things, it usually
   has the opposite effect.
 * Many thanks,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [6 months ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18752659)
 * Hi Peter,
 * I didn’t mean that the scan was running and had completed sucessfully – I just
   meant that the scan was running. Sorry for being unclear. And unfortunately, 
   it still does not complete…
 * [https://app.screencast.com/SU5orumNWKv0i](https://app.screencast.com/SU5orumNWKv0i)
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18752686)
 * Ah, thanks for letting me know [@pstidsen](https://wordpress.org/support/users/pstidsen/)!
 * Would it be OK to paste another scan log from this (or a new) attempt just so
   I can see the current settings and the point at which it fails?
 * Thanks again,
   Peter.
 *  Thread Starter [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * (@pstidsen)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/#post-18761115)
 * Hi Peter,
 * I have just sent a new Email Diagnostic Report.
 * Best Regards,
   Peter

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/infinite-loop-25/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/infinite-loop-25/page/2/?output_format=md)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finfinite-loop-25%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 19 replies
 * 2 participants
 * Last reply from: [pstidsen](https://wordpress.org/support/users/pstidsen/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/infinite-loop-25/page/2/#post-18795868)
 * Status: not resolved