Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting timeout error. Please guide me solution. #671

Open
Jaimin-Devhero opened this issue Jan 9, 2024 · 2 comments
Open

I am getting timeout error. Please guide me solution. #671

Jaimin-Devhero opened this issue Jan 9, 2024 · 2 comments

Comments

@Jaimin-Devhero
Copy link

I have the laravel 9 app

insight versions: "nunomaduro/phpinsights": "^2.7",

image
@TanisukeGoro
Copy link

@Jaimin-Devhero

I have the same issue.
It's because phpinsight somehow tries to inspect more files than expected.
(The progress bar in the console shows that there are over 3000 files, but only a few hundred should actually need to be inspected.)
It's not an essential solution, but ./tmp/* should work around the problem for once by deleting.

$ rm -rf ./tmp/*
$ php artisan insights

@TanisukeGoro
Copy link

@Jaimin-Devhero
In my case, the cause was found.
A recent change was made in my project to output PHPStan cache to /tmp.
This was generating a lot of files in /tmp and delaying the execution of phpinsights.

The way to deal with this (assuming you are using Laravel) was to specify the directory to exclude in config/insights.php where there is an 'exclude' entry.

This solved this problem.

Maybe something similar is happening :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants