[
https://issues.apache.org/jira/browse/IOTDB-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17572998#comment-17572998
]
yanze chen commented on IOTDB-3989:
-----------------------------------
It has been verified that the thread count of IOTDB does not remain at a high
level after closing the SessionPress program. During the execution of the
SessionPress program, IOTDB creates threads for each session. When the
SessionPress program is stopped, the resources are immediately released and the
threads transfer to the TIMED_WAITING state( as shown in the attachment
`rpc_client_thread_state.png` ), and by default these idle threads are released
after 60 seconds.
`IoTDBConfig.java` has a `thriftServerAwaitTimeForStopService` parameter which
will be used when the Thrift service is created and eventually as the
keepAliveTime parameter in the ThreadPoolExecutor. The release time of idle
threads can be controlled by adjusting the thriftServerAwaitTimeForStopService.
For example, if you set thriftServerAwaitTimeForStopService to 5, then 5
seconds after the SessionPress application exits, the idle threads will be
released and a drop in the number of threads can be observed.
> Server thread does not release
> ------------------------------
>
> Key: IOTDB-3989
> URL: https://issues.apache.org/jira/browse/IOTDB-3989
> Project: Apache IoTDB
> Issue Type: Bug
> Affects Versions: 0.13.0
> Reporter: 刘爽
> Assignee: yanze chen
> Priority: Major
> Attachments: SessionPress.java, image-2022-07-28-15-11-45-684.png,
> image-2022-07-28-15-12-12-341.png, rpc_client_thread_state.png
>
>
> (1) Run SessionPress
> (2) Kill the SessionPress
> The server thread does not release.
>
> The client stops abnormally,the Server thread does not release
> !image-2022-07-28-15-12-12-341.png!
> !image-2022-07-28-15-11-45-684.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)