Daniel
Posted on July 8, 2022
PSA: For a maximally enjoyable read, play my song of the day while reading.
After what essentially amounted to a day's worth of wasted time trying to figure this out, Heroku support came through for the win.
My personal website had been running flawlessly up until yesterday, where out of the great beyond my entire App crashed on Heroku. I was getting the dreaded H10 error. Interestingly it was happening only after adding a couple of icons with react-icons. I would push, then after a second or two of functionality it would crash.
But when I checked out to the head position before my adding of the icons, and pushed again it worked!
Surly this massive crash couldn't have been from adding a couple of tiny react-icons.
Well... kind of.
After sorting through a long list of accumulating errors, this one stuck out to the Heroku rep:
2022-07-07T17:47:12.103981+00:00 app[web.1]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Meaning...at some process in my application, WAY too much memory was being used in the memory heap.
For now, the short-term solution was changing the node settings on Heroku's end with
$ heroku config:set NODE_OPTIONS="--max_old_space_size=2560" -a <app_name>"
and
export NODE_OPTIONS="--max-old-space-size=8192"
to increase the allowed memory of node.
While that did fix the fatal error, I suspect I have a memory leak somewhere.
But that's for another Day of Learning from My Mistakes.
Until next time 👋
-Dan
www.dndl.me
Posted on July 8, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.