Multitenant causes site to crash

this happened earlier too

getting the

We will be back soon.


I followed the easy install, then setup production, then multitenancy from here

the site gives this error. Please help if I need to follow more steps.

If you have root access (#) run:

service supervisor restart
service nginx restart

If you are using an non-root account but with sudo privileges ($) run

sudo service supervisor restart
sudo service nginx restart

And try accessing the sites again.

Hope this helps



I’ve tried that already. doesn’t help.

Run a bench update and tell us what you see!

everything looks fine except
cannot proceed with update: you have local changes in app “frappe” that are not committed.

gives the following choices

Okay change to frappe-bench/apps/frappe and erpnext folders and run a git stash and follow any messages on the screen.

Then go back to frappe-bench and do a bench update.

ran the update. site is still not working (hey, thanks for your help by the way)
except this warning

Did you install ERPNext at all using

bench --site install-app erpnext

unable to scroll upto that point to check. should I install again and run bench update?

If you don’t have a folder called erpnext in frappe-bench/apps, you’ve not installed ERPNext. Yeah go ahead and run the command to install ERPNext on both site1.local and the other site you set up.

I do have erpnext and frappe folders in frappe-bench/apps. that is where I did the git stash command.
the first site was running perfectly fine. the error i mentioned in the original post happened when I installed new site. (note: it was dns based, I’m running a digitalocean droplet. I hope that’s not causing the problem. I had also tried dropping the site2.local but still got the error)

I installed app in both sites, it didn’t do much though.

ran the bench update command. doesn’t help.

Did you have to use sudo for all bench commands?

Just do a su frappe from root and then scroll to frappe-bench folder and run a bench update.

Not working. I’ll start from scratch tomorrow. and will post all the commands here, in case I missed or did something incorrect. Really appreciate your help. Have found a great community to work with. Thanks for the app too. Thanks @JayRam

Hey, the problem happens when I do
sudo service nginx reload

before that, the first site is working fine. Although the new site is shows “Can’t find server” error throughout.

this time, I used google cloud and root to execute command

now I’m trying to follow your instructions again
restarted supervisor and nginx - site still down
bench update shows local changes not committed
ran git stash in apps/frappe then in apps/erpnext
site is still down.

should I share the whole console text? if yes, how?

If you have root access, you should install ERPNext using the commands:

  1. sudo su
  2. apt-get install python-minimal
  3. wget
  4. python --production --user frappe

But since you say the first site is working fine, you’d have done that right.

Is your domain pointed to this Server IP on your Domain Control Manager? What’s the domain name of your second site?



pointed original site to using bench set-url-root
then created new site using bench new-site
intalled erpnext app
turned on the dns-multitenant
did bench setup nginx

original site was still working fine, then when I did sudo service niginx reload , the original site crashed.

note that the whole time test subdomain showed server not found error.
I’m using cloud dns provided by google.

Sorry if this is stupid,

Do I have to create a record in dns to point to test.mydomain? if yes, where to point it to?

also, I tried port based multitenancy in digital ocean droplet and it has worked. droplet does not have the domain set up, so it’s just an ip address. how do i test dns based multitenancy with just an ip address? i mean, what is the subdomain if I create new site?

Yes, to the public IP address of the base server.



yeah that I’ve done. I could access the original site using the domain. I’m asking about the new site which is a subdomain, do I have to setup dns for it or it will be handled by nginx?