Maximum execution time errors on Windows

Version v5.11.7

Environment Windows Dedicated

Checklist

  • Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja?
    • No
  • Have you searched existing issues?
    • Yes, found mentions, but not fixes, here and here
  • Have you inspected the logs in storage/logs/laravel.log for any errors?
    • Yes, see below

Describe the bug

SystemHealth.php’s checkFileSystem() function tries to iterate over every file in the root directory of the website, including the vendor files, which understandably takes a while and eventually results in Maximum execution time errors.

Steps To Reproduce

Clean install on a Windows Dedicated Server then load the Dashboard.
I don’t know what I should write here that wouldn’t be a full tutorial on how to install InvoiceNinja on Windows :skull:

Expected Behavior

I mean technically it’s working as intended, but I suppose ideally don’t hit Maximum execution time.

Additional context

Maybe consider not iterating over the vendor folder? My work around for now is to always return 'Ok'.

Screenshots


Logs

laravel.log

[2024-12-29 10:16:31] production.ERROR: Maximum execution time of 30 seconds exceeded {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Maximum execution time of 30 seconds exceeded at C:\\Program Files\\nginx\\html\\billing.connectmy.biz\\app\\Utils\\SystemHealth.php:160)
[stacktrace]
#0 {main}
"} 

php_errors.log

[29-Dec-2024 10:16:30 UTC] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\Program Files\nginx\html\billing.connectmy.biz\app\Utils\SystemHealth.php on line 160
1 Like

Hi,

Thanks for the detailed error report!

@david can the vendor folder be excluded from the file permission check?

1 Like

The vendor directory is already ignored.

Hi David, I’m afraid that’s not the case, please see the screenshots below:


I’d say this is an issue with Windows and the vendor directory not being resolved like linux.