atmosphere icon indicating copy to clipboard operation
atmosphere copied to clipboard

org.atmosphere.websocket.maxTextMessageSize should be configured per handler

Open nwong4932 opened this issue 7 years ago • 2 comments

org.atmosphere.websocket.maxTextMessageSize should be allowed configure per handler, global one make all handler use same buffer size for Session. this make memory usage can increase by unnecessary. Such as there are several end point, one is for large message, the max could be 10M, but others are designed for small message less than 1k. but the global config make all session buffer size 10M, this make the service use more memory is required, sometime is message is busy, it lead to outofmemoryerror.

nwong4932 avatar Aug 08 '16 22:08 nwong4932

@nwong4932 I don't understand exactly what you are asking for when you talk about "per handler". But if you have one application that uses significantly more memory than the others, you should probably create a separate web app (i.e., a separate servlet endpoint) for that memory intensive service. As the size limit value needs to be passed to the underlining websocket factory at its startup, I don't see any flexible way of using a different value within a single endpoint. Or do you have a concrete suggestion? thanks.

elakito avatar Aug 09 '16 10:08 elakito

Hi Elakito, I can't separate the user, they are in same app, the big message only send occasionally. Per handler means per managedservice annotation class. I do see tomcat jsr365 endpoint has its message size for every endpoint. Best

nwong4932 avatar Aug 09 '16 15:08 nwong4932