Projects tigase _server server-core Issues #96
Limit number of messages stored in DB (#96)
Artur Hefczyc opened 1 decade ago

tigase.server.amp.MsgRepository has a method: storeMessage(...) which stored messages. Right now it stores unlimited number of messages in DB.

This is bad, as it is also called by OfflineMessages plugin and can cause DB overfill and/or OOM on the server in case such a user goes online and there is too many packets waiting for that user.

We need to limit number of packets stored for any given pair: from, to. If counting packets in DB for the pair form - to is too slow and may impact performance then it is acceptable to limit number of packets stored counted for to field only.

If possible make it configurable with default max set to 100.

Andrzej Wójcik (Tigase) commented 1 decade ago

Added limit for number of messages stored by MsgRepository in database. By default limit is works for pair from - to.

Limit can be changed by setting store-limit parameter of AMP component and MessageAmp plugin to proper value.

count-limit-query parameter allows to change query used to count messages already stored in database to custom one (first parameter in query will be replaced with to and second with from)

If there is need to change default value of any parameter related to MsgRepository used by AMP component or MessageAmp plugin, this parameter with new value should be passed to both of them!! Is it OK?!

OfflineMessages plugin uses custom repository implementation so this limit will not apply to this plugin.

issue 1 of 1
Type
Task
Priority
Major
Assignee
RedmineID
473
Version
tigase-server-5.1.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#96
Please wait...
Page is in error, reload to recover