Why does db.currentOp output the hello command

I see a lot of hello commands in the db.currentOp command, But I never use them, so why does db.currentOp output the hello command?

My MongoDB version is 5.0.2

Welcome to the MongoDB Community Forums @111854 !

I see a lot of hello commands in the db.currentOp command, But I never use them, so why does db.currentOp output the hello command?

The hello command is used by drivers and applications to discover information about MongoDB deployments (topology, role, supported auth mechanisms, etc). This is the first command run as part of the standard connection handshake, so if you just started up a driver or application which opens a connection pool (for example, 10 connections) you will see these listed in the currentOp output.

If you are curious about more technical details, please see the MongoDB Handshake specification on GitHub.

Regards,
Stennie

1 Like

Thanks for your help

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.