Giter Site home page Giter Site logo

process out of memory about uglifycss HOT 10 CLOSED

fmarcia avatar fmarcia commented on May 25, 2024
process out of memory

from uglifycss.

Comments (10)

fmarcia avatar fmarcia commented on May 25, 2024

Hi, thanks for the feedback.
Did you try to use the flag max_old_space_size (http://stackoverflow.com/questions/26094420/fatal-error-call-and-retry-last-allocation-failed-process-out-of-memory)?

from uglifycss.

stevenmusumeche avatar stevenmusumeche commented on May 25, 2024

Yes, I did and got the same error:

'/usr/local/bin/node' '/usr/bin/uglifycss' /tmp/inputdsbYCy --max_old_space_size=2000000

from uglifycss.

fmarcia avatar fmarcia commented on May 25, 2024

Could you check with last commits? If it doesn't work, could you post your css file?

from uglifycss.

fmarcia avatar fmarcia commented on May 25, 2024

I made a few tests with even bigger files (65 K-lines, 1.6 MB) and it works flawlessly with last updates.

Besides, your command should be:
'/usr/local/bin/node' --max_old_space_size=2000000 '/usr/bin/uglifycss' /tmp/inputdsbYCy
as it's a node flag, not an uglifycss one

from uglifycss.

stevenmusumeche avatar stevenmusumeche commented on May 25, 2024

Am I running the most recent commits? I ran this command:

$ npm install uglifycss
[email protected] node_modules/uglifycss

I got the same error as before, even with the modified command you listed. Here is the CSS file that is causing the error: https://gist.github.com/stevenmusumeche/da66a87648d9c5c958c5

from uglifycss.

fmarcia avatar fmarcia commented on May 25, 2024

You can run npm to update uglifycss now.
I tried to run it against your file and it worked fine.

from uglifycss.

stevenmusumeche avatar stevenmusumeche commented on May 25, 2024

@fmarcia thanks again for your help, but I am still having the same issue even after updating to [email protected]. I am running node v0.12.0, is that what you are running?

I've tried two things:

uglifycss /tmp/inputmpkpCa

I immediately get FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

Next I tried

'/usr/local/bin/node' --max_old_space_size=2000000 '/usr/bin/uglifycss' /tmp/inputmpkpCa

and immediate got:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)

Any other ideas of how I can figure out what's happening? Is this a node issue or something to do with the configuration of my VM?

from uglifycss.

stevenmusumeche avatar stevenmusumeche commented on May 25, 2024

I ran node in debug mode and this is the output that I got, seems like the issue is happening on line 29?

$ node debug /usr/bin/uglifycss /tmp/inputmpkpCa
< Debugger listening on port 5858
connecting to port 5858... ok
break in /usr/lib/node_modules/uglifycss/uglifycss:29
 27  */
 28
>29 var util = require('util'),
 30     uglifycss = require('./'),
 31     uglies = [],

from uglifycss.

stevenmusumeche avatar stevenmusumeche commented on May 25, 2024

Based on the above error I removed node from my system and reinstalled using yum and the problem disappeared. Thank you so much for your help!

from uglifycss.

ikodev avatar ikodev commented on May 25, 2024

I got the same problem (out of memory) however I fix it with a simple reinstallation of uglifyjs and uglifycss in my node_modules/ local project directory (symfony). Seems like it was a version problem ? I don't know... but it's works now !

from uglifycss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.