2 ms·
Threads. They solve so many problems, and they also let you really mess yourself up. Every service request would new some worker object which would in turn spi
by mabbo 10y ago
Threads. They solve so many problems, and they also let you really mess yourself up.
Every service request would new some worker object which would in turn spin up an FixedThreadPoolExecutorService (or something like that) to handle some concurrent work it needed before returning.
But I failed to properly close or dispose or whatever it was with the executor service. So the threads? They stuck around, doing nothing. And every service call that came in, another K threads were created.
Thank god we had a good metrics system tied into the JVM stats or we might not have even noticed, except that processes seemed to die from time to time.
- mschaef 10y ago> Every service request would new some worker object which would in turn spin up an FixedThreadPoolExecutorService I've recently reviewed (and failed) code that did exactly this. Maybe it's a more common misunderstanding than I'd have thought.