--------------------------------------------------------------------------- DocumentTooLarge Traceback (most recent call last) in ----> 1 mongo_upload(checkin) in mongo_upload(endpoint) 20 endpoint_str = str(endpoint) 21 Collection = db[endpoint_str] ---> 22 Collection.insert_many(endpoint) 23 # Collection.insert_one(endpoint) 24 # print('uploaded {} collection to mongodb.'.format(endpoint_str)) ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/collection.py in insert_many(self, documents, ordered, bypass_document_validation, session) 759 blk = _Bulk(self, ordered, bypass_document_validation) 760 blk.ops = [doc for doc in gen()] --> 761 blk.execute(write_concern, session=session) 762 return InsertManyResult(inserted_ids, write_concern.acknowledged) 763 ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/bulk.py in execute(self, write_concern, session) 526 self.execute_no_results(sock_info, generator) 527 else: --> 528 return self.execute_command(generator, write_concern, session) 529 530 ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/bulk.py in execute_command(self, generator, write_concern, session) 357 client = self.collection.database.client 358 with client._tmp_session(session) as s: --> 359 client._retry_with_session( 360 self.is_retryable, retryable_bulk, s, self) 361 ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/mongo_client.py in _retry_with_session(self, retryable, func, session, bulk) 1382 retryable = (retryable and self.retry_writes 1383 and session and not session.in_transaction) -> 1384 return self._retry_internal(retryable, func, session, bulk) 1385 1386 def _retry_internal(self, retryable, func, session, bulk): ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/mongo_client.py in _retry_internal(self, retryable, func, session, bulk) 1414 raise last_error 1415 retryable = False -> 1416 return func(session, sock_info, retryable) 1417 except ServerSelectionTimeoutError: 1418 if is_retrying(): ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/bulk.py in retryable_bulk(session, sock_info, retryable) 351 352 def retryable_bulk(session, sock_info, retryable): --> 353 self._execute_command( 354 generator, write_concern, session, sock_info, op_id, 355 retryable, full_result) ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/bulk.py in _execute_command(self, generator, write_concern, session, sock_info, op_id, retryable, full_result) 307 ops = islice(run.ops, run.idx_offset, None) 308 # Run as many ops as possible in one command. --> 309 result, to_send = bwc.execute(ops, client) 310 311 # Retryable writeConcernErrors halt the execution of this run. ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/message.py in execute(self, docs, client) 904 905 def execute(self, docs, client): --> 906 request_id, msg, to_send = self._batch_command(docs) 907 result = self.write_command(request_id, msg, to_send) 908 client._process_response(result, self.session) ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/message.py in _batch_command(self, docs) 896 def _batch_command(self, docs): 897 namespace = self.db_name + '.$cmd' --> 898 request_id, msg, to_send = _do_bulk_write_command( 899 namespace, self.op_type, self.command, docs, self.check_keys, 900 self.codec, self) ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/message.py in _do_bulk_write_command(namespace, operation, command, docs, check_keys, opts, ctx) 1395 """Bulk write commands entry point.""" 1396 if ctx.sock_info.max_wire_version > 5: -> 1397 return _do_batched_op_msg( 1398 namespace, operation, command, docs, check_keys, opts, ctx) 1399 return _do_batched_write_command( ~/miniforge-pypy3/envs/yelp/lib/python3.9/site-packages/pymongo/message.py in _do_batched_op_msg(namespace, operation, command, docs, check_keys, opts, ctx) 1320 return _batched_op_msg_compressed( 1321 operation, command, docs, check_keys, ack, opts, ctx) -> 1322 return _batched_op_msg( 1323 operation, command, docs, check_keys, ack, opts, ctx) 1324 DocumentTooLarge: BSON document too large (92 bytes) - the connected server supports BSON document sizes up to 16777216 bytes.