Me again...
So we've come up with a solution with our roster size being too big. Since we keep a entry of all users who have favourited each other (which means they can chat to one another), we decided to populate the roster for each user when they log on to the site. When they log off, we will clean up the rosters by removing or remove them once the session has timed out.
We had problems with the delay times when adding loads of rosters though, the system would get lagged and it would be ages before the roster was updated and the person would see their contacts.
Thats just some back ground info on the problem.
We decided that it might be best to configure ejabberd to use mySQL, but just for rosters. Since we would then be able to add roster entries straight into the DB without putting overhead on the ejabberd system, which means it could concentrate on just doing chat and user registrations.
I've configured the system and it seems to be working to a degree.
My config entries look like such (the database is not on the same machine as ejabberd:
{odbc_server, {mysql, "host.net", "ejabberd", "ejabberd", "password"}}.
{mod_roster_odbc, []},
The above is the only entry that I have configured to be _odbc, which I assume is correct. I have not added the auth section for mysql, since I only want rosters in mysql. I have however, tested it with auth on mysql, and it does auth through the DB (can create user, etc), but the roster still behaves the same.
Now, if I add a roster entry for a particular user via the web admin interface, it adds it to the mySQL database just fine, then when run (via the command line)
ejabberdctl get_roster 42 localhost
It returns the roster as you would expect, which is good so far. The problem comes in when I try to add_roster entries via mod_rest or via the command line. For instance, the following has no effect what so ever (24912 is a registered user):
add_rosteritem 42 localhost 24912 localhost Garth Contacts both
No roster entry is entered into the DB. Logging level is set to 4 and there is nothing coming up in the logs.
Anyone able to help?
Thanks
Update
dbl post :(
same problem here. Any fix?
same problem here. Any fix?
Update
Thought I would post a update.
I've managed to insert a entry into the db and now when I run ejabberdctl get_roster it is actually returning the entry. Also, when I log on, the web interface is showing the contact too. How ever, if I add a roster entry via the web interface, which is still basically executing the add_rosteritem command, then no entry shows up in the mySQL db, but it does show up in the web interface.
What this says to me, is that when get_roster is being run by the web interface, it's getting results from the mnesia db AND the mySQL db.
I've upped the logging to level 5 and I can see some select statements being run for get roster, how ever, no insert/update statements are being run for adding a roster entry.
I've included bits of a log entry of a add rosteritem command executes
ejabberdclt does not work with odbc
In fact this module mod_admin_extra was just blindly trying to write to internal DB.
We have fixed this issue, but i do not know how to upload this fixes.
Paste anywhere
In fact this module mod_admin_extra was just blindly trying to write to internal DB.
We have fixed this issue, but i do not know how to upload this fixes.
If it is few lines (less than 30 lines), you can put here in a comment. If it is long, you can put inhttp://pastebin.com/ or http://paste.jabbim.cz/ and then comment here the URL.
I'll either commit your patch to SVN, or upload the patch to a permanent page.
Can you upload / paste your changes?
In fact this module mod_admin_extra was just blindly trying to write to internal DB.
We have fixed this issue, but i do not know how to upload this fixes.
Hi Anh25721,
Would you mind sharing your changes? I have hit the exact same issue...
Thank you in advance
--Franky
Hi Anh25721, i need your
Hi Anh25721, i need your fixes too, please share it in some way.
Thanks a lot.