0

I've configured a ejabberd instance on debian 10, from debian packet (version 18.12). I have 3 virtual host (let's call the example1.com, example2.com and example3.com).

The first one is using LDAP to talk to our Active Directory, in order to authenticate the users, the others are using SQL (mysql) backend to keep user credentials.

What is needed is that every user in these 3 domains must see in his roster all the other users.

In order to achieve this, I've created 4 shared roaster for each virtualhost:

  • The first has @all@ as members but no displayed groups, and I'm using this to "export" all the members to the other 2 domains
  • The second has @all@ as members and itself as displayed groups, in order to have all the users of that domain see eachself.
  • The other two "imports" the "exported" shared groups from the other domains.

It's kinda workig-ish... I can see all the users, grouped as i want, but the server is sucking too much cpu everytimes someone logins (or so it seems).

My fear is that I've implemented a circular dependency and that the server keeps running in circle iterating through all the lists.

Is what I've done legit? Is there a better way to implement this?

Thanks

SimoneLazzaris
  • 382
  • 1
  • 4
  • Consider posting SHOW CREATE TABLE tbl_name; and the query you are using that might have a 'cirular dependency', the EXPLAIN SELECT (your query in questiion). If you have a crash, post the last 400 lines of your error log for analysis on a separate question. – Wilson Hauck Dec 20 '19 at 02:40

1 Answers1

0

If there were a loop, ejabberd would either A) consume all resources and crash miserably: you would notice that!, or B) detect the loop and throw a nice crash message in the log files: look for such a thing when a user logins.

Another possibility, if your domains have many accounts (let's say hundreds or thousands), is quite simply a bottleneck: there are too many elements to process by the CPU, or to store in RAM, or to deliver using the network.

If the bottleneck is the network, you can try @online@ instead of @all@ in some of your groups...

Badlop
  • 580
  • 3
  • 5
  • I do have some crash, but the seems unrelated to the xmpp user login process. I don't see any issue related to the loop. I only have around 100 users, so I don't think that the network is the bottleneck. – SimoneLazzaris Dec 17 '19 at 14:29