设置最大阻塞后异常,而且不会恢复原来的运行 #239
Labels
bug
Something isn't working
needs investigation
This issue or proposal needs some investigations
waiting for response
waiting for the response from commenter
System info (please complete the following information):
问题描述:
当前项目中采用的是ants.NewPoolWithFunc()方式进行协程处理并发任务,同时设置了最大阻塞ants.WithMaxBlockingTasks(100).
项目开始运行没有问题,但是当任务执行达到最大阻塞值的时候,项目就停止运行了,直接报错:
too many goroutines blocked on submit or Nonblocking is set
这种错提示超过了阻塞大小,任务注入失败,但是问题出现在任务持续报错(任务里面不涉及阻塞代码逻辑),也就是我的之前的任务执行完成后也没有进行释放,验证方式是: 我才用定时器去触发任务9点启动,但是15点观察10点后就没有了任务数据,原因排查就是持续抛错,没有释放。这种该如何处理,有没有机制可以抛出这个异常让阻塞队列数据清空,这样我的新任务就可以成功了。或者有什么方式可以解决这个问题。
The text was updated successfully, but these errors were encountered: