jsdoc2md / jsdoc-api

A programmatic interface for jsdoc3 with a few extra features
MIT License
61 stars 15 forks source link

jsdoc-to-markdown fails with ENOBUFS #24

Open csempesz opened 3 years ago

csempesz commented 3 years ago

This is the same issue as reported in https://github.com/jsdoc2md/jsdoc-api/issues/21 I'm running into this issue even after I have upgraded to 6.0.1. I'm using Node v14.15.4 on Windows 10. Not sure about other projects but our src is somewhat large. I can see when I debug the spawned jsdoc process, that jsdoc is trying to deal with roughly 85K doclets. I can also see when watching the Memory heap size in Chrome DevTools that the memory size for the spawned process goes up to 850MByte so the default maxBuffer setting for the spawned process (20M) is not nearly enough. If I mess around with jsdoc-api/lib/explain-sync and update the maxBuffer to 1G (maxBuffer: 1024 1024 1024) then my process finishes as expected. Not sure what to do at this point. Up until now, we used jsdoc 3.4 with Node version < 12. But we had to upgrade Node to LTS version however the upgrade also forced us to upgrade jsdoc to 3.6. Now our process to generate JSON from doclets is broken. Does it make sense to allow setting the maxBuffer size as an env variable?

75lb commented 2 months ago

Hi, if you get time could you check if this is still an issue in v9.1.0 please. The sync functions have been abolished and I'm hoping this issue doesn't affect the async methods.