-
Notifications
You must be signed in to change notification settings - Fork 168
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
Unhandled exception breaks down grunt task #213
Comments
@shervud to begin with, can you check what |
I suspect that it's quite an old version, and then these problems are likely to go away on the latest version ( |
Thank you for the quick response. Anyway... How is it possible that for example I ran 100 times grunt task to create critical.css from url http://example.com and randomly it may be crushed (suppose on 70 of 100 run). |
Theoretically, even if penthouse has error , does not grunt successfully handle that error if --force option is provided? |
In general, a timeout means your page didn't load. A crash can mean that you we're running out of memory on the machine you were running this on. Are you starting 100 penthouse job in parallel? That essentially means opening up a 100 browser tabs, which would not surprise me if it crashes. Try limiting the number of jobs you run in parallel and hopefully that will resolve the errors. I personally run about 4-5 in parallel, but it depends on your machine. |
Arrr, karrrramba!!!)) |
It would be rather look like error on Node side, i don't know... |
Sorry I wasn't sure, it was just a suggestion, but okay then I know that's not the case. Penthouse does indeed throw after a certain timeout has been reached. The default timeout value is 30s, and this can be changed in the Penthouse options, see the readme here: You might want to debug why your site is taking over 30s to load occasionally. Are you hitting a live site over http, or a local html file? |
Is there a way to workaround this issue? May be by try/catch grunt fail in Node.js process ? |
For getting verbose output, see the debugging section in readme: If you could paste the output here, then we can see how far your critical css generation gets for the jobs where you have this issue. Other than this I just saw a comment on the critical library (which is built on top of penthouse), from a user saying that they were able to fix this issue via downgrading the ws library - perhaps check out and test? |
Yeah, it helped me. Thank you a lot! Quite strange, for sure. But the problem was in ws package. It had been upgraded from 3.3.2 to 3.3.3 at December 2017. So after I downgraded and locked ws to 3.3.2, it started to work. |
Glad to hear it worked for you! |
Hi colleagues.
I faced with unknown problem. I cannot reproduce, resolve and handle that problem. I have written that problem here gruntjs/grunt#1614
In case when I make 100 similar runs of grunt-critical task, sometime and randomly grunt can be crushed and I do not have ideas why.
I use all the tasks with --force. And it seems that sometime it is handled as OK, and sometime NOT.
Take a look at these screenshots:
There is a fail:
And there is no fail:
Can you assume where the problem begins in penthouse side or Node.js side, or in grunt side?
Thank you all.
The text was updated successfully, but these errors were encountered: