core-async

tianshu 2019-01-18T09:14:34.072800Z

increasing threads.

tianshu 2019-01-18T09:15:23.073800Z

I found there're a lot async-thread-macro have a Park states. is it okay? they keep increasing

tianshu 2019-01-18T09:16:19.074400Z

I use the thread macro is a async block for jdbc operation and use some pipeline-blocking

alexmiller 2019-01-18T13:33:14.074800Z

That doesn’t look ok

alexmiller 2019-01-18T13:34:11.075800Z

What do you mean by an async block?

alexmiller 2019-01-18T13:34:17.076Z

go?

2019-01-18T18:21:45.076800Z

sounds like the code inside thread is not returning, so the threads are not freed?

2019-01-18T18:35:54.077800Z

@doglooksgood you can use the threads tab to look at the stack traces and see what all those supposedly live threads are doing - perhaps you asked them to do a blocking put on a channel that isn't being read?

2019-01-18T18:37:51.079600Z

my guess would be something similar, go blocks launching threads and not waiting for them to finish(so no feedback), and the threads are blocked on a shared resource (maybe a connection pool) so you are calling thread faster then they can complete their tasks

2019-01-18T18:38:57.080400Z

the number of live threads is less then the number of total started, which makes me guess the theads aren't blocked forever and are completing, you are just creating them faster then they complete