aboutsummaryrefslogtreecommitdiff
path: root/src/mod_mam.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_mam.erl')
-rw-r--r--src/mod_mam.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index 9595be99f..a643fe51c 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -77,6 +77,17 @@
%%% API
%%%===================================================================
start(Host, Opts) ->
+ case gen_mod:get_opt(db_type, Opts) of
+ mnesia ->
+ ?WARNING_MSG("Mnesia backend for ~s is not recommended: "
+ "it's limited to 2GB and often gets corrupted "
+ "when reaching this limit. SQL backend is "
+ "recommended. Namely, for small servers SQLite "
+ "is a preferred choice because it's very easy "
+ "to configure.", [?MODULE]);
+ _ ->
+ ok
+ end,
Mod = gen_mod:db_mod(Host, Opts, ?MODULE),
Mod:init(Host, Opts),
init_cache(Mod, Host, Opts),