{"action":"created","issue":{"url":"https://api.github.com/repos/processone/ejabberd/issues/1065","repository_url":"https://api.github.com/repos/processone/ejabberd","labels_url":"https://api.github.com/repos/processone/ejabberd/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/1065/comments","events_url":"https://api.github.com/repos/processone/ejabberd/issues/1065/events","html_url":"https://github.com/processone/ejabberd/issues/1065","id":147678116,"number":1065,"title":"mod_mam and messages limit","user":{"login":"beherit","id":5073817,"avatar_url":"https://avatars.githubusercontent.com/u/5073817?v=3","gravatar_id":"","url":"https://api.github.com/users/beherit","html_url":"https://github.com/beherit","followers_url":"https://api.github.com/users/beherit/followers","following_url":"https://api.github.com/users/beherit/following{/other_user}","gists_url":"https://api.github.com/users/beherit/gists{/gist_id}","starred_url":"https://api.github.com/users/beherit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beherit/subscriptions","organizations_url":"https://api.github.com/users/beherit/orgs","repos_url":"https://api.github.com/users/beherit/repos","events_url":"https://api.github.com/users/beherit/events{/privacy}","received_events_url":"https://api.github.com/users/beherit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/processone/ejabberd/labels/Component:MAM","name":"Component:MAM","color":"c7def8"},{"url":"https://api.github.com/repos/processone/ejabberd/labels/Kind:Feature","name":"Kind:Feature","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-04-12T08:44:11Z","updated_at":"2016-05-22T17:18:45Z","closed_at":null,"body":"Could You add an option to limit max MAM messages per user (just like it is in mod_offline and access_max_user_messages)? I know that I can delete old mam messages by using delete_old_mam_messages commad BUT some user can send spam and 2GB mnesia database limit is exceeded in short time."},"comment":{"url":"https://api.github.com/repos/processone/ejabberd/issues/comments/220844275","html_url":"https://github.com/processone/ejabberd/issues/1065#issuecomment-220844275","issue_url":"https://api.github.com/repos/processone/ejabberd/issues/1065","id":220844275,"user":{"login":"weiss","id":71850,"avatar_url":"https://avatars.githubusercontent.com/u/71850?v=3","gravatar_id":"","url":"https://api.github.com/users/weiss","html_url":"https://github.com/weiss","followers_url":"https://api.github.com/users/weiss/followers","following_url":"https://api.github.com/users/weiss/following{/other_user}","gists_url":"https://api.github.com/users/weiss/gists{/gist_id}","starred_url":"https://api.github.com/users/weiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiss/subscriptions","organizations_url":"https://api.github.com/users/weiss/orgs","repos_url":"https://api.github.com/users/weiss/repos","events_url":"https://api.github.com/users/weiss/events{/privacy}","received_events_url":"https://api.github.com/users/weiss/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T17:18:45Z","updated_at":"2016-05-22T17:18:45Z","body":"This also happened on jabber.at again, and it looked like it was triggered by a `delete_old_mam_messages` call there as well.\r\n\r\nI have [a patch][1] that uses [transactions][2] whenever the `archive_msg` table is modified.  From reading the Mnesia docs this should not be strictly necessary, but I can well imagine this change will nevertheless avoid that issue.\r\n\r\nApart from that, I have [another patch][3] that tells ejabberd to quit storing messages when the table size reach about 1.9 GiB.  But that won't help for this case where it seems like a single call trashes the table.\r\n\r\nI'll probably push both changes if nobody objects.\r\n\r\n[1]: https://github.com/weiss/ejabberd/commit/edc76517663acdb51b3f86bf28498534b51485b0\r\n[2]: http://erlang.org/doc/apps/mnesia/Mnesia_chap4.html\r\n[3]: https://github.com/weiss/ejabberd/commit/c6f010c479980787a8a21f2c1addfa3764b22533"}}
{"actor":{"display_login":"weiss"}}