Skip to content

node-sass threadpool issue seems to still be there #147

Closed

Description

@adjavaherian

I've just pulled @latest from sass-loader and node-sass, and I'm still seeing the processor peg at 100% as noted in #100 . Should I be using a different branch as a workaround? Thanks.

Activity

  1. jhnns commented on Aug 16, 2015

    @jhnns
    Contributor

    Mhmm the latest should be fine. Can anyone confirm this?

  2. adjavaherian commented on Aug 17, 2015

    @adjavaherian
    Author

    I think I've been able to reproduce it on this branch. https://github.com/adjavaherian/sass-lifter-loader/tree/node-sass-threadpool-issue If you npm start the branch in the current state, the process ties up and just hangs, but if you go to index.js and change the threadpool size to 4, process.env.UV_THREADPOOL_SIZE = 4; it will compile. Conversely, if you leave the threadpool size at 5 and remove @import "./base"; from example/scss/Frontpage.scss and YetAnother.scss (there are 4 imports total), the thread will hang.

    It's tricky and very well could be a something to do with the way I'm creating new webpack instances from within a webpack loader.

  3. jorrit commented on Sep 3, 2015

    @jorrit
    Contributor

    It seems you're running webpack from within webpack. Probably some part of that causes yet another node fs-thread to block. Maybe the maximum parallellism of sass-loader should be configurable, so you can set it at UV_THREADPOOL_SIZE - 2 instead of UV_THREADPOOL_SIZE - 1.

  4. jcreamer898 commented on Sep 4, 2015

    @jcreamer898

    So I had to do process.env.UV_THREADPOOL_SIZE = 20; to get things working.

    Is that the permanent fix? Still feels more like a workaround.

  5. jhnns commented on Oct 5, 2015

    @jhnns
    Contributor

    @jcreamer898 you should not need to adjust process.env.UV_THREADPOOL_SIZE. The sass-loader is queuing its tasks so that node-sass is not blocking all threads (until node-sass has resolved this).

  6. jcreamer898 commented on Oct 5, 2015

    @jcreamer898

    Ok, I'll update to the latest and see if I can run it now without it. Thanks!

  7. jhnns commented on Oct 23, 2015

    @jhnns
    Contributor

    Anyone still having problems?

  8. jhnns commented on Oct 25, 2015

    @jhnns
    Contributor

    Could you guys check if the branch fix/threadpool-issue fixes this problem while using the default process.env.UV_THREADPOOL_SIZE?

  9. jcreamer898 commented on Oct 26, 2015

    @jcreamer898

    Yeah, I'll have a look.

  10. jcreamer898 commented on Oct 26, 2015

    @jcreamer898

    @jhnns I still saw the issue in that branch unfortunately. The build I'm dealing with is quite large, so I'm not surprised. It hung at ~68% for me and just got stuck.

  11. jcreamer898 commented on Oct 26, 2015

    @jcreamer898

  12. jcreamer898 commented on Oct 26, 2015

    @jcreamer898

    Ha, I realized in my package.json I was on 2.0.1. Bumped to 3.1.1, removed the env thing, and it worked ok.

  13. jhnns commented on Oct 26, 2015

    @jhnns
    Contributor

    That's nice 👍

    Could anyone reading this issue also check out the branch? I would like to pull it on the master, but I don't have a test setup that demonstrates the problem.

  14. adjavaherian commented on Oct 26, 2015

    @adjavaherian
    Author

    I dont seem to have this problem anymore and I'm pretty sure we're using the master branch, so not sure what happened exactly. Hopefully this doesnt cause more confusion. :) Lemme double check in a bit.

    Sent from my iPony

    On Oct 26, 2015, at 9:46 AM, Johannes Ewald [email protected] wrote:

    That's nice

    Could anyone reading this issue also check out the branch? I would like to pull it on the master, but I don't have a test setup that demonstrates the problem.

    —
    Reply to this email directly or view it on GitHub.

  15. adjavaherian commented on Oct 26, 2015

    @adjavaherian
    Author

    Ya, I've been using 2.0.1 for a while now and not had any issues with threadpool. In fact, I don't even set the UV_THREADPOOL anymore and it seems to just work. I just tried npm installing the fix branch and it looks like there's a problem with its package.json?

    //package.json
    "sass-loader": "git://github.com/jtangelder/sass-loader#fix/threadpool-issue",
    npm ls sass-loader
    web@0.0.0 /home/adjavaherian/Desktop/web-off-master
    └── sass-loader@3.1.0  invalid (git://github.com/jtangelder/sass-loader.git#d415f3fe1c8ad5e4c507fefa9f3734b4766d9d8f)
  16. 7 remaining items

  17. adjavaherian commented on May 3, 2017

    @adjavaherian
    Author

    this is resolved in v2.x and higher, right?

  18. alexander-akait commented on May 3, 2017

    @alexander-akait
    Member

    @adjavaherian now v6.0.3 sass-loader 😄

  19. alexander-akait commented on Jun 7, 2017

    @alexander-akait
    Member

    Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!

  20. myme commented on Aug 30, 2017

    @myme

    I'm experiencing this right now with [email protected] and [email protected]. Setting process.env.UV_THREADPOOL_SIZE = 25 in our webpack.config.js does consistently resolve the issue. Not sure what additional information I can provide if anybody wants to look further into this?

  21. thenanyu commented on Oct 10, 2017

    @thenanyu

    I'm also experiencing this with latest versions of node-sass and sass-loader, also working around by setting threadpool to 100

  22. casimcdaniels commented on Jan 31, 2018

    @casimcdaniels

    Experience this issue in [email protected] and [email protected]. Trying to import a common variable file from multiple places inside a VueJS application. As @myme mentioned, setting UV_THREADPOOL_SIZE "fixes" the issue.

    @evilebottnawi Can we reopen? The above workaround feels like a hack.

  23. alexander-akait commented on Feb 1, 2018

    @alexander-akait
    Member

    @casimcdaniels can you create minimum reproducible test repo and describe what is problem?

  24. jhnns commented on Apr 13, 2018

    @jhnns
    Contributor

    The issue is still there, I guess, since sass/node-sass#857 hasn't been closed.

  25. jhnns commented on Jul 11, 2018

    @jhnns
    Contributor

    I'm reopening this since it's still an issue for us

  26. reopened this on Jul 11, 2018
  27. alexander-akait commented on Jul 11, 2018

    @alexander-akait
    Member

    @jhnns any ideas ho we can fix it?

  28. alexander-akait commented on Dec 14, 2018

    @alexander-akait
    Member

    /cc @bensampaio can you provide minimum reproducible test repo there you have problem.

    Also if somebody have problem, feel free to feedback and try to provide minimum reproducible test repo, thanks

  29. alexander-akait commented on Aug 20, 2019

    @alexander-akait
    Member

    Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions