-
Notifications
You must be signed in to change notification settings - Fork 397
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
Add swap file adjustment for webapp build #2204
Add swap file adjustment for webapp build #2204
Conversation
leave enough memory for the system. increase swap with min size
There are some deprecation and linting warnings that should be addressed in another PR |
src/webapp/run_rebuild.sh
Outdated
|
||
if [[ -z $NODEMEM ]]; then | ||
# mininum memory used for node | ||
local mem_min=512 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: How can we use min 512MB for Node when the entire device only has so much? E.g. Pi Zero 2 only has 512MB. I guess you try to max out the swap size in the next step with this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "missing" memory is compensated by the swap.
I made a few testruns with the old memory steppings and using only 256 MB was causing failures during build.
So i used the next step (512 MB) from the old code , which didn't faild so far in multiple tests.
This is also already documented.
The 3 A+ has only 512MB physical ram too and it works well so far.
due to unpredictable npm connection errors. Show webapp fin message only if webapp build fails
Further information for commit use prebuilt webapp bundle also for develop The bundled webapp was used for installations from the official repos RPi-Jukebox-RFID/installation/routines/customize_options.sh Lines 287 to 289 in 6551669
As the webapp is now build during installation and the official repos release branches ( The docs have been updates accordingly. |
src/webapp/run_rebuild.sh
Outdated
----------------------------------------------------------- | ||
| You are running a hardware with limited resources. | | ||
| Building the Web App takes significantly more time | | ||
| and might fail. | | ||
----------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about unifying this with show_slow_hardware_message
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did think about this too.
Which message should we use?
And do you want to import the helper script or just duplicat the message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not merge it and instead give a little bit more support
Building the Web App takes significantly more time. In case it fails, check the documentation to trouble shoot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to write a second time, that the hardware is slow ;-)
This is ready for final reviews |
Tested on a RPI 3 A+ and a RPI Zero W with 512MB Ram