FISCO-BCOS / FISCO-BCOS/java-sdk

调用Contract后EventSubscribeImp线程池与线程无法自动释放

Open
#933 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
58
Forks
62
PR merge metrics
No merged PRs in 30d

Description

# sdk版本:v2.9.3
# sdk运行环境spring cloud应用服务
## 用户数据调用Contract上链后,EventSubscribeImp线程池与线程无法自动释放,导致spring cloud应用服务线程数增大,一直无法释放
![156de919e53560a228755b505c48a4e](https://github.com/user-attachments/assets/31c25279-49b2-47f2-a26c-4131111a0b87)
![1e6071bab150786048c8110bf300493](https://github.com/user-attachments/assets/9366f7dd-f815-44a5-9806-0e8b2f842c6d)

## 应用场景:
### 每次客户上链数据,都需要初始化一次Contract,都会调用EventSubscribe.build
![image](https://github.com/user-attachments/assets/c00553cd-f5ab-4162-bcd2-cc06783295dd)
### 每调用一次EventSubscribe.build都会触发new EventSubscribeImp
![image](https://github.com/user-attachments/assets/84fbadbd-087b-4bed-a310-bd3e56b6c0a2)
### 每次new EventSubscribeImp都会触发new ScheduledThreadPoolExecutor
![image](https://github.com/user-attachments/assets/2f270d28-a49d-4bf8-94fc-b0fb063ff50b)

## 问题结果:
开启了大量的线程然后无法释放,导致应用程序内存耗尽

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.