# Idle cypher-shell process in redhat linux using high cpu

**URL:** <https://community.neo4j.com/t/idle-cypher-shell-process-in-redhat-linux-using-high-cpu/51731>\
**Category:** Newbie Questions\
**Tags:** cypher-shell\
**Created:** [February 10, 2022, 8:22am UTC](https://community.neo4j.com/t/idle-cypher-shell-process-in-redhat-linux-using-high-cpu/51731 "2022-02-10T08:22:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubensselvakumar](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/rubensselvakumar/32/22337_2.png) [@rubensselvakumar](https://community.neo4j.com/u/rubensselvakumar)\
**Post date:** [February 10, 2022, 8:22am UTC](https://community.neo4j.com/t/idle-cypher-shell-process-in-redhat-linux-using-high-cpu/51731/1 "2022-02-10T08:22:51Z")

</div>

Hi,

We are experiencing high cpu usage when the cypher-shell process initiated by users are not closed properly because of unix session timeout, please can you help fixing this.  
Is there a way we can set idle session timeout at client end?

Linux Machines: AWS ec2 instances with RHEL 8.  
Neo4j: 4.4.3

Issue Scenario:  
User establish a ssh connection from jump host to the AWS ec2 instance and use cypher command to connect to the neo4j DB.  
Once AWS ec2 ssh/ssm connectivity is closed the cypher-shell process remains active and started to consume more cpu resource (one complete core), more than one such process started to saturate cpu resource(cores).

====  
[root@server-1 ~]# ps -def|grep cypher  
root **590136** 590108 0 11:02 pts/2 00:00:02 /usr/bin/java -jar /usr/bin/../share/cypher-shell/lib/cypher-shell.jar  
root **590280** 590227 1 11:03 pts/4 00:00:01 /usr/bin/java -jar /usr/bin/../share/cypher-shell/lib/cypher-shell.jar

===  
[root@server-1 ~]# netstat -anplt|head -2;netstat -anplt|grep " **590136**"  
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name  
tcp6 0 0 127.0.0.1:49306 127.0.0.1:7687 ESTABLISHED **590136** /java  
tcp6 0 0 127.0.0.1:49304 127.0.0.1:7687 ESTABLISHED **590136** /java

[root@server-1 ~]# netstat -anplt|head -2;netstat -anplt|grep " **590280**"  
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name  
tcp6 0 0 127.0.0.1:49380 127.0.0.1:7687 ESTABLISHED **590280** /java  
tcp6 0 0 127.0.0.1:49378 127.0.0.1:7687 ESTABLISHED **590280** /java

===

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/e/a/eac20e001038f71e225035c3b265e39a20931bae.png)

Thank you,  
ruben.

---

<div class="post-metadata">

**Author:** ![rubensselvakumar](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/rubensselvakumar/32/22337_2.png) [@rubensselvakumar](https://community.neo4j.com/u/rubensselvakumar)\
**Post date:** [February 14, 2022, 9:13am UTC](https://community.neo4j.com/t/idle-cypher-shell-process-in-redhat-linux-using-high-cpu/51731/2 "2022-02-14T09:13:12Z")

</div>

Attaching thread dumps for reference.  
[cypher-shell-idle-process-thread-dump-2955825-001.txt](https://community.neo4j.com/uploads/short-url/50g7bwDpuqKkUEgfxd20s6WrDls.txt) (12.1 KB)  
[cypher-shell-idle-process-thread-dump-2955825-002.txt](https://community.neo4j.com/uploads/short-url/4U9b8xoyL0gFV0dKyhgWs6qgFc2.txt) (12.1 KB)  
[cypher-shell-idle-process-thread-dump-2955825-003.txt](https://community.neo4j.com/uploads/short-url/xbm1S9f73UJ1R6vlgkqFlnfIJoh.txt) (12.1 KB)  
[cypher-shell-idle-process-thread-dump-2955825-004.txt](https://community.neo4j.com/uploads/short-url/1sj9DImI9NJZpyQBxYOTomrx7i1.txt) (12.1 KB)  
[cypher-shell-idle-process-thread-dump-2955825-005.txt](https://community.neo4j.com/uploads/short-url/6OW1XBTjCtBDtEsqvq7SDUQTLmo.txt) (12.1 KB)
