简体   繁体   中英

MongoDB "Failed to query for documents to update ... unable to decode message length: EOF"

I'm doing a bunch (ie around 30) of upserts in a row and occasionally getting "Failed to query for documents to update: handshake failure: connection(etc-etc-etc.mongodb.net:27017[-10399]) unable to decode message length: EOF" . Each update uniquely changes the whole document, as opposed to changing the same field(s) to one new value as with updateMany .

Is this a problem with making many separate update requests? I'm using MongoDB's Stitch service FWIW. The Stitch js API suggests that it just creates one connection, but it feels like every update is trying to create a new connection or something.

In my case I received this message when using the GO MongoDB client library. I was trying to issue a shutdown command, but apparently this can only be issued from localhost.

Run the shutdown against the admin database. When using shutdown, the connection must originate from localhost or use an authenticated connection.

I am using an authenticated connection, but I'm guessing there's some error being returned that the library isn't expecting.

I'm wagering that because the Stitch service is a MongoDB product it will be written in Go. They seem to really love Go these days :).

I doubt this will help you, but it's probably an issue with the driver.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM