docpad / docpad-plugin-related

Adds support for related documents to DocPad
Other
10 stars 2 forks source link

Docpad 6.55.4: JS Allocation failed - out of memory #5

Closed mikeumus closed 11 years ago

mikeumus commented 11 years ago

Originally via @Aglezabad - bevry/docpad/issues/719

DocPad v6.55.3 Node v0.10.21 npm v1.3.11 Windows 8.1 - Windows Surface Pro 1

docpad run fails in the following:

Performing generate: Write the database cache at 8/9 89%
 ===========================================---
---FATAL ERROR: JS Allocation failed - process out of memory
An error occured within the child DocPad instance: exited with a non-zero status code

Also as per @Aglezabad, docpad-plugin-related is the culprit here.

balupton commented 11 years ago

I have an idea of what will be causing this. I'll take a go at it tomorrow. Will likely be a backwards incompatible change. Probably, instead of doing @document.relatedDocuments, instead you will need to do @getRelatedDocuments(@document) instead (this isn't coded yet, just a brainstorm). As the issue will be the database cache hits a cyclic loop due to the related documents when trying to serialize the database, so instead of storing the related documents as a model attribute, we store it as a model attribute (already done), but expose it via a template helper (not yet done).

balupton commented 11 years ago

Published. Check the readme for the new docs :)

mikeumus commented 11 years ago

Thanks again for saving the day @balupton. :+1: