We're Hiring!

Mattermost, Inc.

Mattermost Message Size Limit

Hi guys,

Mattermost has a hard limit of 4000 characters for posts/messages - obviously this is probably enough for most use cases but I was wondering if there was a particular performance reason for limiting to that amount? Would raising the limit cause any issues if I was to do so on my own fork, running Postgres, especially around full text search?

Obviously, if there was a lot more message data in the database it would make full text search slower but I guess I was curious to know that say if you had a character limit of 20,000 instead of 4000 as is now but most messages were generally less than 500 or so characters, would that affect anything in any way?



What would be the advantage of increasing the limit to 20,000 chars?

With 20,000 chars, and an average of 5.1 chars per English word, that’s 3,921 words - about 4 full pages of 8 1/2 x 11 paper.

If teammates were posting 4-page messages to Mattermost, I’d tell them to stop and use attachments.

Just because you can do something doesn’t mean that you should :smile: Personally, I’m glad there’s a limit of <1 full page of text for messages.

For me it’s more about integration with internal services.

I agree with you, for normal chat messages such long messages do not seem necessary but for hooks I can see the odd occasion when it might be of use when integrating with our local build/deployment systems. I would hope that generally people would use them in such a way that they aren’t getting 4000+ characters of data but it’s certainly a possibility in certain limited circumstances. At the moment the return message from the outgoing hook call would be rejected and not shown if more than 4000 characters are returned.

I could be wrong but from reading the documentation, slack hooks and messages don’t have a character limit that I could see which would mean that the idea of being compatible with them whilst essentially is true, isn’t technically 100% in edge cases.

Make this limit as an option (per server, per channel ?) also make sense with markdown support, as you can easily go over limit.