Celluloid and ThreadError: can't create Thread: Resource temporarily unavailable

796 views Asked by At

I'm running several workers that handle the work with Celluloid using mainly async. Some pieces of my code use also future or after. Everything works really good and fast but eventually the system starts to raise: ThreadError: can't create Thread: Resource temporarily unavailable

I'm using Ruby 2.3.1 and I would like to know if there's a solution to prevent this. I don't care if I handle a pool of workers to keep the amount of threads under control but I don't want to raise the point I don't have any more threads free and the system crash.

Is moving to JRuby the only way to solve this?

0

There are 0 answers