[SERVER-26035] When SocketException error: 9001 happened, does primary performance decrease? Created: 09/Sep/16  Updated: 15/Nov/21  Resolved: 09/Sep/16

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.0.8
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Daiki Matsui Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongo.log    
Participants:

 Description   

Hi,
Our application used MongoDB with replication.
After I saw following errors, our api's performance connect to MongoDB decreased.

ip-111-111-111-111 is primary
ip-111-111-111-112 is secondary
ip-111-111-111-113 is arbiter

```
Sep 9 09:03:18 ip-111-111-111-111 mongod.log INFO NETWORK [ReplExecNetThread-42147] SocketException: remote: ip-111-111-111-112:8030 error: 9001 socket exception [RECV_TIMEOUT] server [ip-111-111-111-112:8030]
Sep 9 09:03:18 ip-111-111-111-111 mongod.log INFO NETWORK [ReplExecNetThread-42147] DBClientCursor::init call() failed
Sep 9 09:03:18 ip-111-111-111-111 mongod.log WARN NETWORK [ReplExecNetThread-42148] Failed to connect to ip-111-111-111-112:8030, reason: errno:115 Operation now in progress
Sep 9 09:03:18 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] Socket recv() timeout ip-111-111-111-112:8030
Sep 9 09:03:18 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] SocketException: remote: ip-111-111-111-112:8030 error: 9001 socket exception [RECV_TIMEOUT] server [ip-111-111-111-112:8030]
Sep 9 09:03:18 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] DBClientCursor::init call() failed
Sep 9 09:03:18 ip-ip-111-111-111-113 mongod.log WARN NETWORK [ReplExecNetThread-40577] Failed to connect to ip-111-111-111-112:8030, reason: errno:115 Operation now in progress
Sep 9 09:08:33 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] Socket recv() timeout ip-111-111-111-112:8030
Sep 9 09:08:33 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] SocketException: remote: ip-111-111-111-112:8030 error: 9001 socket exception [RECV_TIMEOUT] server [ip-111-111-111-112:8030]
Sep 9 09:08:33 ip-ip-111-111-111-113 mongod.log INFO NETWORK [ReplExecNetThread-40576] DBClientCursor::init call() failed
Sep 9 09:08:33 ip-ip-111-111-111-113 mongod.log WARN NETWORK [ReplExecNetThread-40578] Failed to connect to ip-111-111-111-112:8030, reason: errno:115 Operation now in progress
Sep 9 09:08:34 ip-111-111-111-111 mongod.log INFO NETWORK [ReplExecNetThread-42147] Socket recv() timeout ip-111-111-111-112:8030
Sep 9 09:08:34 ip-111-111-111-111 mongod.log INFO NETWORK [ReplExecNetThread-42147] SocketException: remote: ip-111-111-111-112:8030 error: 9001 socket exception [RECV_TIMEOUT] server [ip-111-111-111-112:8030]
Sep 9 09:08:34 ip-111-111-111-111 mongod.log INFO NETWORK [ReplExecNetThread-42147] DBClientCursor::init call() failed
Sep 9 09:08:34 ip-111-111-111-111 mongod.log WARN NETWORK [ReplExecNetThread-42149] Failed to connect to ip-111-111-111-112:8030, reason: errno:115 Operation now in progress
```

I think the above error indicates that primary and arbiter could not connect to secondary.
And I do not think it does not cause primary MongoDB performance decrease. (Our app connect to primary.)
However when the following error happened, our api's response time connect to MongoDB increased.

If the above error happen, what does primary server do?
Does primary server reconnect existed connection?
And why does SocketException happen?

I am sorry to cause you inconvenience, but I am looking forward to reply.



 Comments   
Comment by Kelsey Schubert [ 09/Sep/16 ]

Hi ikemonn,

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group.

Regards,
Thomas

Generated at Thu Feb 08 04:10:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.