简体   繁体   中英

error: Forever detected script was killed by signal: SIGKILL

Recently I'm having an issue with my server.

My node server stops, and forever does not restart it.

In my forever log I see this line:

error: Forever detected script was killed by signal: SIGKILL

The server itself does not throw an error. In fact the server seems to run without any glitches and then a random SIGKILL is executed.

I don't know if it's AWS shutting down my server, or if it's an issue with forever, or perhaps the node server itself.

Searching Google does not provide much insight.

I thought this might be related to a cpu spike or a memory usage spike, but both seem to be low (but maybe there's a spike for a split second that I don't recognize).

Is this an issue anyone has encountered before? Any idea how can I fix it?

Well.. Why the problem occurred is still mystery but I was able to resolve it by reducing the queue for my queries on my MongoDB.

While both mongo and node were not using a lot of RAM this seems to be the cause of the issue since by reducing the number of queries, the problem disappeared.

What exactly triggered the SIGKILL is still a mystery, yet I thought this information maybe useful for other users.

For me it had to do with the way mongoose was setup and interacting with the application code.

I was able to fix by creating a connection using the answer from here: Mongoose Connection , creating my schema definitions and only exporting the models to be used.

I hope this is helpful to someone

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM