-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Complete VM freeze while running the following gulp task #38
Comments
I have no idea how this could possibly work given that svg2png is not a transform stream so .pipe() should not impact it. In fact calling it with no arguments should just error. |
It works because we use gulp-svg2png. Also filed the issue at that repo. I suspect it is because running out of memory, but I can't prove as I won't be able to check because of the freeze. |
Just updated the issue over there: akoenig/gulp-svg2png#16 I guess we need some kind of parameter in order to make it work on this side to mention it should reuse an existing phantomjs or something like that. I have the feeling that for each svg2png conversion a new phantonjs browser is started. My OS runs out of memory and freezes as you can see in my latest output from top, just before the freeze.
|
Yeah that's an option. Another option is to just limit the number of conversions you do in parallel. It looks like gulp-svg2png has a "concurrency" parameter you could use? |
I checked that one out. However it just slows down the time I run out of memory. As you can see above each phantomjs instance takes quite a big amount of memory. It would be way better if your code uses one phantomjs. I think karma does something similar. When we run karma there is only one phantomjs spawned. |
What happens if you set concurrency to 1? |
They recently released an update. It indeed has that option now, however the library now works even without limiting the concurrency just fine. It seems they fixed it. I tried before without updating as I didn't knew they recently released an update, so the concurrency option I put in was just not used. Anyway thanks for your suggestion. |
Oh cool! I'm curious to see what they did; I'll check it out. I'm still open to an option to reuse PhantomJS instances, but designing the API will be tricky so we'd need someone who's willing to do some brainstorming with me plus implementation work on that, probably in a separate issue. |
Hi,
Our development VM has 4GB of memory and 2CPU assigned at 75% execution cap. We are running the following gulp script to transform our svg to png. However 8 out of 10 times it completely kills the VM. The only solution is to just force a poweroff and reboot.
It is ran on a debian wheezy VM.
I really hope there is someone with a solution for this issue.
The input are 109 SVGs. Is there a way to make it work without freezing the whole OS?
The text was updated successfully, but these errors were encountered: