Skip to content
Discussion options

You must be logged in to vote

Is sql_schema_multihost: true supposed to enable a shared pool of DB connections?

Looking at the documentation site and to the source code, i think no.

This is just a quick look at what I found in the source code:

  • A) ejabberd_sql_sup:init/1 for each vhost, it reads its sql_pool_size option and starts the corresponding processes that will run ejabberd_sql:start_link for that vhost. Each process starts a connection to the SQL server.

  • B) On the other hand, the multihost schema option is used in ejabberd_sql_pt when preparing the SQL queries: instead of calling different databases for each vhost, it calls the same database for several hosts, and adds "server_host=" to the SQL query

Th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marc0s
Comment options

Answer selected by marc0s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants