# Discourse failed to backup, how to debug?

**URL:** <https://meta.discourse.org/t/discourse-failed-to-backup-how-to-debug/52217>\
**Category:** Product Support\
**Created:** [29. Oktober 2016 um 23:05 UTC](https://meta.discourse.org/t/discourse-failed-to-backup-how-to-debug/52217 "2016-10-29T23:05:28Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2. November 2016 um 02:42 UTC](https://meta.discourse.org/t/discourse-failed-to-backup-how-to-debug/52217/12 "2016-11-02T02:42:29Z")

</div>

Should be fixed per:

[https://github.com/discourse/discourse/commit/7e43e73df69a5ca70e7f4546465525c7392612fb](https://github.com/discourse/discourse/commit/7e43e73df69a5ca70e7f4546465525c7392612fb)

After we forked we correctly reset the `v8` context on pretty text, but the transpiler and js locale helper had `v8` context from parent.

Since v8 is not fork safe (and probably never will be) we must clear all our v8 context after forking.

Long term we should probably extend MiniRacer to allow it to “manually” free up all v8 contexts prior to forking and call a custom fork command, cause ideally prior to fork is the best way to do it. Also ruby really should give us a hook that we can call prior to forking.

Sadly, this has been on the back burner for so so long:

> **[Feature #5446: at\_fork callback API - Ruby - Ruby Issue Tracking System](https://bugs.ruby-lang.org/issues/5446)**
>
> Redmine

---

_[View the full topic](https://meta.discourse.org/t/discourse-failed-to-backup-how-to-debug/52217)._
