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

[5.x] Fix timeout on slow Composer commands #87

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue where the composer create-project command to install the statamic/statamic base project would timeout if it took longer than 60 seconds.

Someone ran into this on Discord yesterday and I just ran into it when helping a family member install Statamic on Windows.

@jhanley-com
Copy link

I ran into this problem as well. I should have checked the PRs first.

I don't think timeout: null is a good idea. A long value is better than no timeout.

I made the following change on my Windows 10 x64 Pro system:

$process = Process::fromShellCommandline(implode(' && ', $commands), $workingPath, null, null, 1200);

Note: 600 seconds was too short.

The original error that I received:

The process "composer create-project statamic/statamic "laravel" --remove-vcs --prefer-dist" exceeded the timeout of 60 seconds.

@jasonvarga jasonvarga merged commit f8e279f into master Oct 24, 2024
1 check passed
@jasonvarga jasonvarga deleted the fix/timeout-on-slow-composer-commands branch October 24, 2024 17:12
@jasonvarga
Copy link
Member

I don't think timeout: null is a good idea. A long value is better than no timeout.

I've merged it as-is. If this was something that would be run on production then yeah sure, but for a local command it's probably fine. You can just ctrl+c to quit it if you need to.

If there's a compelling argument against it feel free to let us know.

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

Successfully merging this pull request may close these issues.

3 participants