Error map

pymongo.errors.AutoReconnect: connection closed / NotPrimaryError pymongo.errors.AutoReconnect: cluster0-shard-00-01.mongodb.net:27017: connection closed (_ssl.c:1129)

MongoDB · layer 5, Data

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

pymongo.errors.AutoReconnect: connection closed / NotPrimaryError — pymongo.errors.AutoReconnect: cluster0-shard-00-01.mongodb.net:27017: connection closed (_ssl.c:1129) (MongoDB)pymongo.err…Sort/Group exceeded memory limit of 100 MB (allowDiskUse) — MongoServerError: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in (MongoDB)Sort/Group exceeded…BSONObj size is invalid / exceeds maximum document size (16MB) — MongoServerError: BSONObj size: 17825792 (0x1100000) is invalid. Size must be between 0 and 16793600(16MB) (MongoDB)BSONObj size is inv…pymongo.errors.ServerSelectionTimeoutError — PyMongo: pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s (MongoDB)pymongo.errors.Serv…NotImplementedError: Collection objects do not implement truth value testing — PyMongo: NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None (MongoDB)NotImplementedError…Atlas: bad auth: Authentication failed — MongoServerError: bad auth : Authentication failed. (Atlas user / special characters in password) (MongoDB)Atlas: bad auth: Au…pymongo.errors.BulkWriteError: batch op errors occurred — PyMongo: pymongo.errors.BulkWriteError: batch op errors occurred (MongoDB)pymongo.errors.Bulk…NotWritablePrimary: not primary and secondaryOk=false — MongoServerError: not primary and secondaryOk=false / NotWritablePrimary: not master (MongoDB)NotWritablePrimary:…OOMKilled — Kubernetes: OOMKilled (exit code 137) (Kubernetes)OOMKilledSIGSEGV — Segmentation fault (core dumped) (Linux)SIGSEGVOOM killer — Killed / Out of memory: Killed process (Linux OOM killer) (Linux)OOM killerEMFILE — Too many open files (EMFILE) (Linux)EMFILEbuffering timed out — MongooseError: Operation `users.find()` buffering timed out after 10000ms (Node.js)buffering timed outMongoServerSelectionError — MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 (Node.js)MongoServerSelectio…MongoParseError — MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://" (MongoDB)MongoParseErrorMongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 — MongoDB: MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 (MongoDB)MongoNetworkError: …querySrv ENOTFOUND _mongodb._tcp — MongoDB Atlas: Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.abcde.mongodb.net (MongoDB)querySrv ENOTFOUND …TypeError: NoneType — TypeError: 'NoneType' object is not subscriptable (Python)TypeError: NoneTypeMongoDB Atlas: connection timed out — IP not whitelisted — MongoServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted (MongoDB)MongoDB Atlas: conn…MongoServerError: Unrecognized pipeline stage name: '$x' — MongoServerError: Unrecognized pipeline stage name: '$lookups' (MongoDB)MongoServerError: U…E11000 duplicate key — MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key (Node.js)E11000 duplicate keyNOAUTH — ReplyError: NOAUTH Authentication required. (Node.js)NOAUTHECR token expired — denied: Your authorization token has expired. Reauthenticate and try again. (Amazon ECR) (AWS)ECR token expiredDocument failed validation — MongoDB: MongoServerError: Document failed validation (code 121) (MongoDB)Document failed val…Atlas free tier: connection limit / cluster paused — MongoServerError: connection ... (too many connections) / Atlas cluster is paused (MongoDB)Atlas free tier: co…Atlas Search: index not found / $search stage requires Atlas — MongoServerError: $search is not allowed or the syntax is incorrect (MongoDB)Atlas Search: index…READONLY You can't write against a read only replica — Redis: READONLY You can't write against a read only replica (Redis)READONLY You can't …Transaction numbers are only allowed on a replica set member or mongos — MongoServerError: Transaction numbers are only allowed on a replica set member or mongos (MongoDB)Transaction numbers…NoSuchTransaction: Transaction was aborted or expired — MongoServerError: Transaction 1 has been aborted / NoSuchTransaction: transaction has expired (transactionLifetimeLimitSeconds) (MongoDB)NoSuchTransaction: …

Directly related (7)

Sort/Group exceeded memory limit of 100 MB (allowDiskUse)MongoDB

MongoServerError: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in

An aggregation stage needed more than 100 MB of RAM and spilling to disk wasn't enabled.

BSONObj size is invalid / exceeds maximum document size (16MB)MongoDB

MongoServerError: BSONObj size: 17825792 (0x1100000) is invalid. Size must be between 0 and 16793600(16MB)

A single document (or an aggregation result row) grew past MongoDB's 16 MB limit.

pymongo.errors.ServerSelectionTimeoutErrorMongoDB

PyMongo: pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s

PyMongo couldn't find a usable MongoDB server within the selection timeout.

NotImplementedError: Collection objects do not implement truth value testingMongoDB

PyMongo: NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None

You used a Database/Collection object in an `if` (`if db:`), which PyMongo forbids.

Atlas: bad auth: Authentication failedMongoDB

MongoServerError: bad auth : Authentication failed. (Atlas user / special characters in password)

Atlas rejected the username/password in the connection string.

pymongo.errors.BulkWriteError: batch op errors occurredMongoDB

PyMongo: pymongo.errors.BulkWriteError: batch op errors occurred

A bulk insert/update had one or more failed operations; details are in `e.details`.

NotWritablePrimary: not primary and secondaryOk=falseMongoDB

MongoServerError: not primary and secondaryOk=false / NotWritablePrimary: not master

A write (or read without secondary preference) hit a secondary — the primary changed or you connected directly to a secondary.

Two steps away (21)

OOMKilledKubernetes

Kubernetes: OOMKilled (exit code 137)

The container used more memory than its limit, and the kernel killed it.

SIGSEGVLinux

Segmentation fault (core dumped)

A program accessed memory it wasn’t allowed to, and the kernel killed it with SIGSEGV (exit code 139).

OOM killerLinux

Killed / Out of memory: Killed process (Linux OOM killer)

The kernel ran out of memory and killed a process to recover — the program just prints “Killed” (exit code 137).

EMFILELinux

Too many open files (EMFILE)

The process hit its file-descriptor limit — sockets, files and pipes all count.

buffering timed outNode.js

MongooseError: Operation `users.find()` buffering timed out after 10000ms

Mongoose queued a query waiting for a connection that never opened.

MongoServerSelectionErrorNode.js

MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

The MongoDB driver couldn’t find a reachable server for the connection string.

MongoParseErrorMongoDB

MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"

The connection string is missing, malformed, or the environment variable holding it is undefined.

MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017MongoDB

MongoDB: MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

The driver couldn't connect to a MongoDB server on localhost:27017 — nothing is listening there.

querySrv ENOTFOUND _mongodb._tcpMongoDB

MongoDB Atlas: Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.abcde.mongodb.net

The driver couldn't resolve the `mongodb+srv://` SRV record for your cluster.

TypeError: NoneTypePython

TypeError: 'NoneType' object is not subscriptable

You used `[ ]` on a value that is `None` — typically a function that returned nothing.

MongoDB Atlas: connection timed out — IP not whitelistedMongoDB

MongoServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted

Atlas rejects connections from IP addresses that aren't in the project's Network Access list.

MongoServerError: Unrecognized pipeline stage name: '$x'MongoDB

MongoServerError: Unrecognized pipeline stage name: '$lookups'

An aggregation stage name is wrong or unsupported by your server.

E11000 duplicate keyNode.js

MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key

An insert/update violated a unique index in MongoDB.

NOAUTHNode.js

ReplyError: NOAUTH Authentication required.

The Redis server requires a password (or ACL user) but the client didn’t authenticate.

ECR token expiredAWS

denied: Your authorization token has expired. Reauthenticate and try again. (Amazon ECR)

Docker’s login to Amazon ECR has expired — ECR tokens last 12 hours, so pushes and pulls fail until you log in again.

Document failed validationMongoDB

MongoDB: MongoServerError: Document failed validation (code 121)

The collection has a JSON Schema validator and the inserted/updated document doesn’t satisfy it.

Atlas free tier: connection limit / cluster pausedMongoDB

MongoServerError: connection ... (too many connections) / Atlas cluster is paused

An M0/Flex tier hit its limits or paused after inactivity.

Atlas Search: index not found / $search stage requires AtlasMongoDB

MongoServerError: $search is not allowed or the syntax is incorrect

`$search` isn't available on this deployment/index.

READONLY You can't write against a read only replicaRedis

Redis: READONLY You can't write against a read only replica

The client is connected to a replica (or a failed-over node) and tried to write.

Transaction numbers are only allowed on a replica set member or mongosMongoDB

MongoServerError: Transaction numbers are only allowed on a replica set member or mongos

You started a transaction (or used retryWrites) on a standalone MongoDB server, which doesn't support them.

NoSuchTransaction: Transaction was aborted or expiredMongoDB

MongoServerError: Transaction 1 has been aborted / NoSuchTransaction: transaction has expired (transactionLifetimeLimitSeconds)

A transaction ran longer than the allowed lifetime (60 s default) or was aborted, so later operations fail.