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
that:

Restart runs the migration(flyway) scripts under resource folder
*fineract-provider\src\main\resources\sql\migrations\core_db.*

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


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
review.*


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
started.

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
instance.


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


Kind Regards,

Nikhil








On Tue, Nov 8, 2016 at 3:37 PM, Thynn Win <thynn....@thitsaworks.com> wrote:

> Hello all,
>
> I was able to create a multi-tenant environment following the
> documentation. Thank you!
> http://mifos.cloud.answerhub.com/questions/704/how-to-
> 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
>
>
>

Reply via email to