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

Use PARCEL_MAX_CONCURRENT_CALLS environment variable #1595

Conversation

albinotonnina
Copy link
Contributor

@albinotonnina albinotonnina commented Jun 21, 2018

I had an issue with Parcel freezing during bundling.
@DeMoorJasper was so kind to help debugging the issue.
Turns out lowering the amount of concurrent calls per worker solves my issue.

This PR let users set that value with an env variable.

Thanks

@KeineLimonade
Copy link

KeineLimonade commented Jun 21, 2018

I think the default value of 10 should still be used in case no environment variable is present.

@albinotonnina albinotonnina force-pushed the env-max-concurrent-calls-worker branch from 9bff9de to 4b2aaa1 Compare June 21, 2018 12:11
@albinotonnina
Copy link
Contributor Author

@KeineLimonade of course! silly me, fixed

@albinotonnina albinotonnina force-pushed the env-max-concurrent-calls-worker branch 6 times, most recently from 512535d to e79bd18 Compare June 21, 2018 12:22
@albinotonnina albinotonnina force-pushed the env-max-concurrent-calls-worker branch from e79bd18 to 71cfa3f Compare June 21, 2018 12:23
@devongovett
Copy link
Member

do we know what is causing the freeze? I'd rather fix that than make everyone configure this.

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Jun 21, 2018

This seems to happen only on projects that are fairly large and use scss, So my guess is it's scss related.

Although I haven't dug very deep into why exactly it is happening, in the example @albinotonnina gave me I could eliminate the freeze by removing all scss imports.

I've done some debugging on the workerfarm and processing 10 assets at the same time makes some assets take a very long time to process (more than 10secs). so I think a lower default would be a good idea, although it would probably have very little performance effect (besides from putting less stress on the workers)

@albinotonnina
Copy link
Contributor Author

It would be an advanced setting, like the other env variable PARCEL_WORKERS.
I guess most people will rarely use it but it could be a good un-blocker while looking for a solution in cases such as mine. It surely makes me continue working!
Btw thanks again @DeMoorJasper. @devongovett you should take him with you at Adobe! :P

@Hammster
Copy link
Contributor

@DeMoorJasper i can confirm that after removing all scss in my example it builds again too. https://github.com/Hammster/parcel-1.9.x-freeze

And @albinotonnina reasoning is totally valid, we are stuck using 1.7.1 because the build freezez, having this option would at least allow us to use the latest version.

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.

5 participants