How to increase heap memory in pandoc execution?

允我心安 提交于 2019-12-02 09:43:38

问题


I am working on converting docx to epub. Document contains lot of images. When execution of converting, i have error:

 “pandoc.exe: Heap exhausted; Current maximum heap size is 1073741824 
   bytes (1024 MB); use `+RTS -M' to increase it. 
   Error while executing job!”

I am using Node.js.

Can any one assist me how to increase heap size?

Update:

I have increased size till 2GB.  But pandoc still shows error 
"Pandoc.exe out of memory"

Is it possible to solve this issue?


回答1:


You can increase the memory available to pandoc, to say 2048 MB, with:

pandoc.exe +RTS -M2048

But the underlying problem is probably that Pandoc uses zip-archive to zip the EPUB file. It seems you currently need at least as much memory as the uncompressed EPUB you want to generate (but I'd verify this before filing a bug report there).

You probably also should scale down your images a bit since 2GB seems rather excessive for an e-book (even if it's a bit smaller when compressed).



来源:https://stackoverflow.com/questions/30704736/how-to-increase-heap-memory-in-pandoc-execution

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!