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

Server Crashing - CNC.js #3

Open
leitenky opened this issue Feb 12, 2019 · 14 comments
Open

Server Crashing - CNC.js #3

leitenky opened this issue Feb 12, 2019 · 14 comments

Comments

@leitenky
Copy link

leitenky commented Feb 12, 2019

I am using your image with no additional configuration and after about 5 minutes the server seems to crash and require a restart. Ive tried creating the image multiple times, verified the sd card is good, and its a new Pi3B+

Is there somewhere the logs are kept?

@jeffeb3
Copy link
Owner

jeffeb3 commented Feb 12, 2019

Bummer. I've been spoiled since it's been so reliable.

It's running from systemd. To see the logs you can use journalctl

journalctl -u cncjs.SERVICE

Add a '-b' to only show one processes logs.

I was just trying this and I didn't see any output, but mine has been working fine. But to get more you can edit /etc/default/cncjs and add -vvv to the DAEMON_ARGS variable.

@leitenky
Copy link
Author

I tried adding -vvv to the Daemon_args and when I try journalctl -u CNCJs.SERVICE I get --no enteries--

Any other advice would be appreciated!

@leitenky
Copy link
Author

I can see after CNCjs starts that the ram slowly Kris fishing and after a couple minutes goes back down to approximately 10%. At that point CNCJs server seems to crash

@jeffeb3
Copy link
Owner

jeffeb3 commented Feb 12, 2019

  1. It is case sensitive, and I'm not sure why I suggested SERVICE in the first place. I blame my phone, sorry. It should be:
    journalctl -u cncjs.service
  2. You can check to see if it's running with sudo service cncjs status
  3. If it's stopped, you can run it manually by doing this:
sudo su # become root
cnc -vvv

@jeffeb3
Copy link
Owner

jeffeb3 commented Feb 12, 2019

Do you have any ideas why it might be working harder or be different on your pi?

@leitenky
Copy link
Author

leitenky commented Feb 12, 2019

No that's the thing, my original image I had done some tinkering ( I believe you helped me on v1engineering site)

So since I kept having issues with the UI I decided to start fresh and I seem to be having the same 5 minute time and then it crashes.

This is the error I see in see:

<--- Last few GCs --->

277284 ms: Mark-sweep 567.6 (716.3) -> 567.5 (716.3) MB, 8218.0 / 0 ms [allocation failure] [GC in old space requested].
285422 ms: Mark-sweep 567.5 (716.3) -> 567.5 (716.3) MB, 8137.7 / 0 ms [allocation failure] [GC in old space requested].
293809 ms: Mark-sweep 567.5 (716.3) -> 567.5 (716.3) MB, 8387.1 / 0 ms [last resort gc].
302165 ms: Mark-sweep 567.5 (716.3) -> 567.5 (716.3) MB, 8356.0 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

2: arguments adaptor frame: 0->1

Security context: 0x74a79031
3: handle [/usr/local/lib/node_modules/cncjs/node_modules/webappengine/node_modules/express/lib/router/index.js:174] [pc=0x309269f0] (this=0x71e11961 <JS Function router (SharedFunctionInfo 0x2e2c7451)>,req=0x4f9c8a31 <an IncomingMessage with map 0x3a7fe121>,res=0x4f9c8ddd <a ServerResponse with map 0x3a7f151d>,out=0x4f9c903d <JS Function (SharedFunctionInfo...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Aborted

@leitenky
Copy link
Author

@jeffeb3 could you try unplugging your CNC from the pi and clicking connect? I am playing with my pi in the house not connected to the CNC because it's easier for me and that seems to be the cause of the memory leak that crashes CNCJs server

@leitenky
Copy link
Author

Hey @jeffeb3 just following up I've tried another fresh image of v1pi and tried to get through a 1.5 hour cut. After about 45minutes CNCJs server seemed to stop working.
Do you use a pi3b or pi3b+? I'm going to just order another SD card (even though it passes all the wrote tests I've thrown at it) just to fully rule the card out.

I'll keep you updated. Thanks for all your help!

@jeffeb3
Copy link
Owner

jeffeb3 commented May 2, 2019

I have it on a few pi versions, including a zero.

There were two CNC.js bugs related to Marlin in 0.9.20. I would suggest either trying the pre-release I just posted, or manually updating cnc.js.

@Bretthansenpc
Copy link

Bretthansenpc commented Jul 18, 2019

i have the same issue 5 minutes and it runs out of memory and shuts down on a pi 3b+ im on the newest beta version too

Im gonna try to put it back on my 3 because that seemed to work better ill let you know

@jeffeb3
Copy link
Owner

jeffeb3 commented Jul 18, 2019

Are you running the X server on the pi too, or just the CNC.js server?

@Bretthansenpc
Copy link

just the way you send it right now no x server

@ehansen2580
Copy link

Was this ever resolved? I'm getting this same issue with the most recent release of the image

@jeffeb3
Copy link
Owner

jeffeb3 commented Dec 31, 2019

Do you have the cnc connected? The issue above was related to trying to connect, and not having a controller to connect to, so it was probably connecting via the builtin serial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants