Commands not responding

I encounter a problem I can not explain…
I can connect to the cluster (class cluster or personal Atlas cluster) with Mongo shell. I can usually use few commands and then it doesn’t respond anymore. I have to quit and connect again to the cluster.

In the screenshot below, everything is fine until I switch to db video.
Then, the next command doesn’t give anything (neither proper response or error message). So I tried a basic “show dbs”, and it doesn’t work better. I can not even use quit().
So I usually use CTRL+C, which shows the last line (2019-04-11T16:14:45.481+0200 I CONTROL [thread1] shutting down with code:0), to be able to quit and restart.

I have the same problem whatever the cluster I use (class cluster or personnal) and whatever my command (right or wrong)… Sometimes I just disconnect/connect and copy/paste the same command and it works…

Any idea (it’s very annoying to have to connect/disconnect every minutes) ?

Nouvelle%20image%20bitmap%20(2)

Any moderator to help with this problem ?

May be some security settings
Did you try --ssl option along with command you are using

–ssl --authenticationDatabase admin

or some indexes missing on collections?

No, it doesn’t make any difference. I use the “-ssl …” to connect to the class cluster and I still have the same problem.

What do you mean by “indexes missing on collections” ?

I was just suggesting if you are running any resource intensive queries without indexes
May be issue is a different one in your case

Hi @Abdelkader_69182,

Can you please try to ping against the primary to check for any latency issues:

ping sandbox-shard-00-00-zh5bt.mongodb.net

Are you able to connect to the cluster and query the data using Compass?

Thanks,
Sonali

@Sonali_Mamgain
I get this when I ping :

I don’t have any problem using compass.

Hi @Abdelkader_69182,

Please check your network connection and then reconnect to your cluster and query. It should work.
In case the same problem persists, please let me know.

Thanks,
Sonali

Thank you @Sonali_Mamgain
My internet connexion works normally, I can do anything else withou a problem.
But the same problem persists for the Mongo shell…

Hi Abdelkader,

Thanks for the additional information.

This looks like it is a networking related issue.

I would like to check some settings on your client machine. Could you please provide me with the output of the following from your command line:

reg query HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime

Please also provide me with the exact version of the mongo shell you are using.

Thanks,
Barry

Hello,

thank you for your help.
The command sends back : “error: key name not valid”
And I use the MongoDB shell version v4.0.8

Abdel