Skip to content
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

Improve Error Notification for Insufficient Memory during npm Module Installation #3630

Closed
3 tasks done
Tracked by #626
MarianRaphael opened this issue Mar 25, 2024 · 9 comments
Closed
3 tasks done
Tracked by #626
Assignees
Labels
size:M - 3 Sizing estimation point story A user-oriented description of a feature
Milestone

Comments

@MarianRaphael
Copy link
Contributor

MarianRaphael commented Mar 25, 2024

Epic

#626

Description

As a FlowFuse user,

I want to receive a clear and informative notification when an npm module installation fails due to insufficient memory,

So that I can understand the cause of the failure and take appropriate action to upgrade my instance to medium or higher to prevent future installation issues.

Which customers would this be availble to

Everyone - CE/Starter/Team/Enterprise

Acceptance Criteria

  • When an npm module installation fails due to insufficient memory, the system should detect this
  • A notification should be generated and sent to the user immediately upon failure detection. This notification should clearly state that the installation failed due to insufficient memory.
  • The notification should include a recommendation to upgrade the instance to a medium level or higher for successful installation.
  • FlowFuse should log these incidents in the AuditLog

Task List

Preview Give feedback
  1. hardillb
  2. hardillb
  3. bug fixed

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

@MarianRaphael MarianRaphael added story A user-oriented description of a feature size:M - 3 Sizing estimation point labels Mar 25, 2024
@MarianRaphael MarianRaphael added this to the 2.3 milestone Mar 25, 2024
@MarianRaphael MarianRaphael moved this from Todo to Up Next in 🛠 Development Mar 25, 2024
hardillb added a commit to FlowFuse/nr-launcher that referenced this issue Mar 26, 2024
part of FlowFuse/flowfuse#3630

This is a first itteration to record the exit codes.

Still needs more customer friendly message
@hardillb hardillb moved this from Up Next to In Design in 🛠 Development Mar 27, 2024
@hardillb hardillb self-assigned this Mar 27, 2024
@hardillb
Copy link
Contributor

Adding extra memory to k8s deployments that can only be used for npm in FlowFuse/driver-k8s#145

But also needs some better UX in Node-RED -> node-red/node-red#4622

@hardillb hardillb moved this from In Design to In Progress in 🛠 Development Apr 8, 2024
@hardillb
Copy link
Contributor

Need to decide what to do with this one, FlowFuse/driver-k8s#145 is merged and deployed to production.

I need to find some more time on node-red/node-red#4622

@hardillb
Copy link
Contributor

Working on: node-red/node-red#4622

This turned out to not be a timeout in NR, but in the nginx reverse proxy. The default timeout for the proxy is 60 seconds. I don't want to change this as it would present a DOS target.

I have opened a PR for NR to add a notification if the POST is closed before the install is complete, and allow the user to open the event log to see the progress or to just allow the install to continue in the background.

@joepavitt
Copy link
Contributor

@hardillb whats' the status on this, not seen any activity for a couple of weeks in here?

@joepavitt
Copy link
Contributor

Update from @hardillb: PR for NR 4.0 is merged, not sure if released into a beta yet

@joepavitt
Copy link
Contributor

@hardillb can you include a screenshot here to show that:

I want to receive a clear and informative notification when an npm module installation fails due to insufficient memory,

has been satisfied if running a NR4.0 instance please?

@hardillb
Copy link
Contributor

hardillb commented May 7, 2024

Not 100%

The current state is

  • An extra 128mb of memory has been available to the Instance container to run npm, this should strongly mitigate the underlying cause of the failure.
  • On FlowFuse the reverse proxy will close the open request that "tracks" the npm install after 2mins no mater what. In this case the Node-RED Editor will now display a message allowing the user to open the log window to continue tracking the install. If they choose not to open the log window (inside Node-RED Editor, not FF) then the only notification of a failure to install will be in the FF Node-RED logs.

@joepavitt
Copy link
Contributor

Okay, so is there any outsanding work to be done on this item, or are we drawing a line under it as is, and moving forward?

@hardillb
Copy link
Contributor

hardillb commented May 8, 2024

I think we close this for now

@github-project-automation github-project-automation bot moved this from Next to Closed / Done in ☁️ Product Planning May 8, 2024
@joepavitt joepavitt moved this from In Progress to Done in 🛠 Development May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M - 3 Sizing estimation point story A user-oriented description of a feature
Projects
Archived in project
Status: Done
Development

No branches or pull requests

3 participants