# Recover from server crash

**URL:** <https://discourse.nodered.org/t/recover-from-server-crash/15132>\
**Category:** Core Development\
**Created:** [5 September 2019 06:51 UTC](https://discourse.nodered.org/t/recover-from-server-crash/15132 "2019-09-05T06:51:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [5 September 2019 10:22 UTC](https://discourse.nodered.org/t/recover-from-server-crash/15132/9 "2019-09-05T10:22:22Z")

</div>

It is not only the `'uncaughtException'`, but every async operation like unhandled errors in EventEmitters (missing `on('error',...)`) and unhandled promise rejections. If any of these happen in your function node, in some cases you cannot even tell that it came from there, as the code is executed from the event loop.

As @knolleary stated, it is hard to determine, where the problem has occurred exactly. So the only reasonable thing is to let the process crash and perform an automatic restart by some process manager like pm2, nssm, etc - at least for production systems. Otherwise you could end up with inconsistent states.

---

_[View the full topic](https://discourse.nodered.org/t/recover-from-server-crash/15132)._
