One tryton server for multiple databases

Hi,

I don’t remember why, but i think it was needed to launch tryton-server with -d database.

trytond -c config_file -d database

We need to make some tests with multiple group of users. So i duplicate a database to have a database for group 1 and another database for group 2. All needed modules are installed and are the same for both groups.

Could i use a unique instance of Tryton server without specifying database when launching server? So each tryton client choose the right database to use.
Thanks! :slight_smile:

Yes, you can even specify both databases when loading the server.
The database flag indicates to load this database on when loading the server.
If you do not specify any database, the databases will be initalitzed on the first request of this database.

As initialitzing a database is normally slow this will slow down the first request of the database.

1 Like

Thanks for answer. One more question, how should i specify multiple databases in the command line ?

trytond -c config_file -d [database1, database2, ...]

or

trytond -c config_file -d database1 database2

I remember i had problems with web applications if database was not specified on the server.

This is the used form. You should include all the database names separated by a space after the -d flag.

Maybe this should be added in the documentation ?

https://docs.tryton.org/projects/server/en/latest/topics/start_server.html#web-service

For me it is already documented on trytond --help

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.