"Maximum execution time of 30 seconds exceeded" in hasEvenNumberOfParentheses Function
Hello everyone,
I'm encountering an issue in a Laravel project (Laravel version 10.45.1, PHP version 8.2.15, Filament version 3.2.37) and am hoping someone might be able to offer some assistance. I'm receiving the following error when executing a specific function in my code:
Fatal error: Maximum execution time of 30 seconds exceeded
The error occurs in the following function:
The function hasEvenNumberOfParentheses
is intended to check if a given expression has an even number of parentheses. The error seems to be triggered by the call to token_get_all('<?php '.$expression);
, suggesting that parsing the expression takes too long.
Does anyone have any insights on how to resolve this issue?
Any help or suggestions would be greatly appreciated!
Thank you in advance!1 Reply
Did you ever figure this out?
I'm also having the same problem and can't pin down which timeout is set to 30 seconds and where it can be changed.
As for where it's happening for you, I would suggest you re-run things. For me, it's failing at different places in the code, depending on where, exactly it is, when the timeout occurs. I am guessing that yours is "random" just like it is for me.