Failing to $merge into databases with more than 13 chars

Hi all,

I’m running a very simple python script to $match some documents and $merge them to a collection in another database. This always succeeds, but raises AutoReconnect error when the database name is more than 13 characters.


import pymongo
from datetime import datetime

db = pymongo.MongoClient("mongodb+srv://*****").get_default_database()
pipeline = [{
    '$match': {
        'dataDate': {'$gte': datetime(2020, 9, 12)}}
}, {
    '$merge': {
        'into': {'db': 'mydbcopylongname', 'coll': 'mydata_snapshot'}

If I replace ‘mydbcopylongname’ with ‘mydbcopy’, it works without raising the error. I experimented a little, and found that it always succeeds, but it consistently raises an error if the name of the db exceeds 13 character.
It might be relevant to note that this is running on Atlas, on an M0 Sandbox.

Thanks in advance.