Skip to content

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

@AndyLvVip

Description

@AndyLvVip

sdk版本:v2.9.3

sdk运行环境spring cloud应用服务

用户数据调用Contract上链后,EventSubscribeImp线程池与线程无法自动释放,导致spring cloud应用服务线程数增大,一直无法释放

156de919e53560a228755b505c48a4e
1e6071bab150786048c8110bf300493

应用场景:

每次客户上链数据,都需要初始化一次Contract,都会调用EventSubscribe.build

image

每调用一次EventSubscribe.build都会触发new EventSubscribeImp

image

每次new EventSubscribeImp都会触发new ScheduledThreadPoolExecutor

image

问题结果:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions