fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thynn Win <>
Subject RE: multi-tenant processes (how to run scripts manually)
Date Wed, 09 Nov 2016 07:00:42 GMT
Thanks so much!

From: Shreyaank Byadagi []
Sent: Wednesday, 9 November, 2016 01:58
To: Thynn Win <>
Subject: Re: multi-tenant processes (how to run scripts manually)


Hope these links will help you in understanding scheduler jobs:
Link 1:
Link 2:


[] Sent with Mailtrack<>

On Wed, Nov 9, 2016 at 12:20 PM, Thynn Win <<>>
Hi Shreyaank,

Thank you for the explanation about the script and scheduler jobs. It was exactly what I was
hoping to find out – the location of the script and the impact (if run manually bypassing
the reboot).

We appreciate your raising the ticket to help reduce the service interruption on Prod server.

I’ll try to read up on what Scheduler Jobs do. If you have info on it, could you give us
some pointers?

Thank you again,

From: Shreyaank Byadagi [<>]
Sent: Wednesday, 9 November, 2016 01:34
Cc: Thynn Win <<>>
Subject: Re: multi-tenant processes (how to run scripts manually)

Hello Thynn,

1.The reason to restart the server is whenever you add a new tenant, it requires migration
scripts to be applied to tenants database and Scheduler Jobs to be activated to that particular
If you don't want to restart the server you can run barebones_db.sql manually to create database
schema. But the problem with this approach is scheduler jobs for newly created tenant will
not be active.
I am raising an enhancement ticket to allow users to add new tenants with active scheduler
jobs without restarting the server.

2. You need to wait until server is restarted completely.


[Image removed by sender.] Sent with Mailtrack<>
[Image removed by sender.]

On Wed, Nov 9, 2016 at 6:33 AM, Nikhil Pawar <<>>
Hello Thynn,

Experts from our community would reply to your queries.

In the mean time, let me give you my naive understanding on your issue.

The reason we restart the server each time when we create a new tenant is

Restart runs the migration(flyway) scripts under resource folder

This makes your new tenant aligned with the current version of the Fineract

I once tried the approach of creating a new tenant, applying these scripts
manually and then update *tenant* table and *tenants_server_connections *
under *mifosplatform-tenants schema.  *

* This approach worked for me but yours is production so hold on for expert

Regarding the other issue of timeout, I am not sure as to what might be the
root cause.

The possibilities might be:

1) The fineract server is yet to start because migration scripts are
running.Community App will not respond until the back end is completely

2) Or in the case  wherein your fineract application ,community app and
database are all running on the same box,

 it might be a over kill ( of course based on your box hardware
configuration). You might want to debug this further checking you database
health and memory stats.

The second point may not be valid if you are running them on different box/
box with higher configuration/ you are running them on cloud on different

Hope these pointers would give you heads up for your debugging until expert
analysis from our community arrives.

Kind Regards,


On Tue, Nov 8, 2016 at 3:37 PM, Thynn Win <<>>

> Hello all,
> I was able to create a multi-tenant environment following the
> documentation. Thank you!
> create-multi-tenant-and-access-it.html.
> We understand the process is that we create entries in tenants and Mifos
> tables (supporting mifos app) in a new tenant database will be created upon
> restarting the server.
> We are concerned about two issues -
> 1)      The need to restart the server each time we add a new tenant.
> Could you please let us know the rationale behind this? Could we run the
> scripts manually somehow? We are concerned about the service interruption
> on the production box every time we need to add a new tenant.
> 2)      We are also experiencing time-out issue when loading mifos page
> (after restarting the server). We found out that db scripts were running in
> the background and the page cannot load until all these scripts were
> completed. In our case, it took about 15 minutes for one tenant. We don't
> wish to impact other tenants' access to Mifos app while new tenant database
> is being created/populated.
> We'd like to better understand which scripts are run as part of new tenant
> creation process and whether we really need to reboot the server. If you
> have suggestions, we would highly appreciate it. If need be we can run
> stuff manually instead of triggering them on page load or server reboot.
> Thank you for all your help.
> Sincerely,
> Thynn

Thanks and Regards

Thanks and Regards

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message