Multiple Instances of V5 connected to one Database


I wanted to find out if it was possible to have 2 separate V5 installs connected to the same database?

At the moment we’re running V5 off shared hosting which is working fine however it is a bit slow.
I want to do some testing to see if installing Invoice Ninja on a VPS I have will have any impact on our speeds

What I was thinking was installing V5 using docker on a VPS that I have and using the db details from our shared hosting provider because as far as I can see, all data is stored in the db and the actual application folder is only used to store the logo as well as documents attached to invoices.

Would this actually work? Would I be able to run 2 instances at the same time?


What part of the app is slow? I would think enabling queues and using the desktop app would have a larger performance impact than changing servers.

@david what do you think?

Queues should be enabled
I did change it to ‘QUEUE_CONNECTION=database’ with the required cron job
I am using the desktop app

I see the slowness when first starting up Invoice Ninja, on the side bar you can see the loading icon going through each item

Next is saving quotes/invoices, it takes way longer than what I would expect. This could also be down to our provider which is something I want to test as well

And last one is PDF generation, this is more than likely due to Phantom Cloud so I want to test snappdf on an Ubuntu server to see if theres any improvement to be had there

In general a VPS is going to be much more powerful than our shared hosting and we don’t need to worry about space so much as we are nearing our limits on our plan

Thanks for the details!

For the slowness when starting the app enabling persist data on Settings > Device Settings will have the app retain the data so it will start much quicker once you’ve logged in. Another option is to change to the React app which doesn’t load all of the data when logging in.

The speed it takes to save is one area where different hosting can make a difference.

Very likely, running SnapPDf locally is much faster.

I will definitely be switching to the React app once its more feature complete, I remember seeing someone recently that there’s now a button to switch to React but in React there’s no button to switch back so I will be waiting on that

So is it possible to have 2 instances connected to the same database?
I could also just clone the database and test on that but it would help if 2 instances can be connected to the same db

I don’t think it should be a problem, it’s how we run our hosted server to support load balancing.