MONGODB | Error checking <IP>:<PORT>: Mongo::Error::MaxMessageSize: Message exceeds allowed max message size. The max is 50331648

hello,
any idea as to why i get the error below? my ELK has been working on. its just today i chnaged he password.. and nothing else.
however this time when i start elk , i get the error below

anything else i need to add in my config. mased from teh error says ive reached limit. but whre do i that? and whats the recommnded value here.

Logs:
W, [2021-11-20T18:58:30.318344 #2819632]  WARN -- : MONGODB | Error checking IP HERE:port: Mongo::Error::MaxMessageSize: 

config:
    mongodb {
        type => "API_DTL"
        uri => 'mongodb://user here:password here@IP:PORT/DBNAME?ssl=false'
        placeholder_db_dir => '/opt/logstash-mongodb/api/'
        placeholder_db_name => 'mongodb.db'
                collection => 'API_collect'
        batch_size => 2000
    }

LOGS:

W, [2021-11-20T19:12:46.338561 #2830452]  WARN -- : MONGODB | Failed to handshake with IP:PORT Mongo::Error::MaxMessageSize: Message exceeds allowed max message size. The max is 50331648.
W, [2021-11-20T19:12:46.339744 #2830452]  WARN -- : MONGODB | Error checking 207.180.201.90:7979: Mongo::Error::MaxMessageSize: Message exceeds allowed max message size. The max is 50331648.

MongoDB is trying to send logstash a message that is larger than the maximum message size that MongoDB supports. I would suggest trying a lower batch_size.

i tried to lower batch_soze but still getting the same error. anything else that i migh thaver been mssing? or that i need to add? i tried 100,500 and 1000.

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