core-async

jrychter 2020-04-15T07:40:27.053600Z

I had a lot of problems with core.async thread pool becoming exhausted, causing hangs. I've been pulling my hair out over this until I found that -Dclojure.core.async.pool-size=96 helps. Not a solution, I know. The problem is that in a large application many libraries might make use of core.async, not just the main code.

jrychter 2020-04-15T07:42:35.053800Z

I reworked every go block in my app to make sure it doesn't perform computation or block on I/O and I've still been getting hangs with the default thread pool size. Apparently the combination of my use of core.async and the libraries causes the issue. Extremely annoying, as this can happen in production after a minute or a month of uptime.