facebook

CI9 prelease sporadic UI problem

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #545089 Reply

    support-swapna
    Moderator

    Fedor,

    Alternatively, you can assign more memory to the Node process when running your application.
    You can create a Node script in your package.json file to increase the memory available to Node when you run your production build.

    For example, if you want to increase the memory to 4gb, then your Node command would be node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --prod.You would then add it to your package.json ‘scripts’ section like this:

    "prod": "node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --prod"

    The scripts object along with other available scripts will be as below :

    "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e",
        "prod": "node --max-old-space-size=4096./node_modules/@angular/cli/bin/ng build --prod"
    }

    You can then run it by calling npm run prod (you may need to run sudo npm run prod if you’re on a Mac or Linux).

    Hope this helps.

    –Swapna
    MyEclipse Support

    #545093 Reply

    Fedor Losev
    Participant

    I’m not sure how running prod build is related to GUI hangs, I don’t have any problems with CLI builds.

    Note when the UI hangs there are no memory problems in log and the serve process itself seems to be running fine and recompile changes on page. What seems broken is UI part, not the node process.

    So I’m not sure memory is related to these hangs (and even if it hangs on some hidden process crash or out of memory, WebClipse definitely should be fixed to not hang all UI actions and show appropriate message).

    Also, in last trace on exit there is no node process involved at all that should be handled by Eclipse on close, so if something just blocks Eclipse action queue it is probably the UI connector part and this shouldn’t happen silently regardless of node process state, node memory or other settings.

    In any case, my node is

    $ node -v
    v6.10.3

    $ npm -v
    4.6.1

    My default node in Eclipse is set to Global (this may be probably related) and I don’t see there an arguments box, these are available only for nodes that come with webclipse.

    #545170 Reply

    Brian Fernandes
    Moderator

    Fedor,

    Can’t really give you a good reason for why changing the memory of ng serve process might help, you definitely raise valid points (which I’m aware of/agree with). However, in situations like this, with these sorts of odd bugs – I wonder about the overall OS stability / load and how that affects other running applications.

    Some more immediate things to try though:
    1) Do you have CodeLive on? If yes, could you try turning it off and see if that results in different behavior over a long standing deployment?
    2) You should be able to serve with a more recent version of Node – if your project can be launched with this version, this might result in drastically different interaction with the IDE (better or worse). Would you be willing to try this?
    If yes, the simplest steps would be
    a) Create a new Angular project with a 8.x or 9.x version of Node. This will download this version of Node and add it to the runtime list. We can now discard this project.
    b) In the terminal+ view for your project, click the Settings icon and change the Node version – the new versions should be listed.
    c) When serving the project, confirm that the new version of Node is being used.

    #545324 Reply

    Fedor Losev
    Participant

    1) I turned CodeLive off and it still happens overnight (btw. is my understanding correct that the only thing CodeLive does for Angular is browsing for page components? So far I didn’t find any use for it as there is nothing live happens while I code).

    2) As for node version experiments, I’m willing to do it but have no time now, will do it later. The hang doesn’t happen very often so meantime I can live with IDE restart. Outdated compilation problem is much more disturbing (when old compiler error that was already fixed pops up after page load at runitme) but I guess it is angular cli / webpack bug.

    Btw. when it happened last time, on Terminal tab close the Eclipse crashed with access violation core dump. The crash came from JRE internals which are supposed to be fixed in later update. I updated to latest Java 8 151 let’s see if it changes something (low probability but it may be related).

    #546170 Reply

    Fedor Losev
    Participant

    I started to experience similar symptoms on non-Webclipse Neon 3 with Java + Tomcat server, so may be it is just coincidence with CI9, it may be some Eclipse + OS problem not related to Genuitec code.

    #547156 Reply

    Fedor Losev
    Participant

    After Windows upgrade, angular 5 upgrade, node 7 upgrade, npm, angular-ide and what not the hang problem seems gone for good (or at least it doesn’t manifest itself for long time).

    ——

    However, now I got into memory problems since Angular 5 / cli 1.6 are way more memory hungry (and there is an apparent memory leak in angular/webpack dev server https://github.com/angular/angular-cli/issues/5613, it starts fine, works for a while and then hangs or crashes outofmemory; how frequently I need to restart obviously depends on given memory).

    Of course ng memory leak it is not a WebClipse problem, but lack of ability for fine-grained memory control for each process is.

    I temporary solve it with below steps, but there should be more conventional way to do it on IDE level, in general all command kinds that run node process should have setting for max memory (or may be you can suggest a way to do it seamlessly with current settings).

    1) I renamed global node.exe to nodex.exe and created node.cmd and node files that call nodex.exe with received parameters + memory parameters for win (%*) and bash (“$@”`) accordingly.

    In general, now it is possible to set there memory conditionally depending on command (e.g. boost memory for ng or tsc only) but I keep it simple for now, hoping it will be resolved.

    At least for IDE ng serve, this also could be solved from IDE with setting NODE_OPTIONS env var, but memory setting in this variable does not work in node 7 (will this node/webpack/angular/typescript behemoth become stable one day?).

    2) In JavaScript > Runtimes I set nodex.exe with –max_old_space_size

    3) In Typescript / Angular Language services I set node.cmd

    4) node_modules/angular-ide/bin/ng just peeks my node file in the global node directory (pointing in angular-ide/bin/ng to other script or adding settings works too but with global I don’t need to touch internals on upgrades)

Viewing 6 posts - 16 through 21 (of 21 total)
Reply To: CI9 prelease sporadic UI problem

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in