Getting too many slow queries on system.session which impacts mongo db performance as well

I am gettting to may LogicalSessionCacheRefresh queries in mongodb version 3.6.4 , 3 node replica set. Following is the sampls query. How we can fix this ?

Can we drop the config.system.session collections?

pls advise on this as its impacting the our services.

		"desc" : "LogicalSessionCacheRefresh",
		"active" : true,
		"currentOpTime" : "2020-10-23T10:55:26.654+0000",
		"opid" : 1761516478,
		"secs_running" : NumberLong(4),
		"microsecs_running" : NumberLong(4179912),
		"op" : "command",
		"ns" : "config.$cmd",
		"command" : {
			"update" : "system.sessions",
			"ordered" : false,
			"allowImplicitCollectionCreation" : false,
			"writeConcern" : {
				"w" : "majority",
				"wtimeout" : 15000
1 Like

i see the same thing. please someone help.

Hi @Michael_Brodmann, welcome!

I understand that it has been a while since you posted this question.

config.system.session is an internal collection to store session records that are available to all members of the deployment. Dropping this, especially on a running cluster, would likely impact session operations.

LogicalSessionCacheRefresh is an internal operation for a replica set. Unfortunately without a holistic view of the cluster deployment and settings it would be difficult to track down the root cause. i.e. network latency, too many open sessions, under provisioned cluster, etc.

If you are using MongoDB v3.6.x (similar to @Murali_Kumpatla), I’d recommend to upgrade your MongoDB cluster (Current stable version is v5.0). This is because MongoDB v3.6.x has reached EOL on April 2021. See also Upgrade Replica Set to v4.0


1 Like