How can I stop logins of only one tenant on a multi-tenant install? (v10)

I have a need to do some work on one of the tenants in a DNS multi-tenant installation so I would like to be able to stop all logins to that one tenant while I do the needed work.

The only method I know of for stopping logins is to use the command:

sudo supervisorctl stop all

When I run that from the /home/def_user/frappe-bench directory it effectively shuts down the logins to ALL tenants on a multi-tenant system.

I am looking for a way to do that for just one tenant so the others can continue to operate without interruption.

Any suggestions?


I can think of a few ways:

  • Change the domain name temporarily
  • Set the site to maintenance mode

Both options will bring the iconic Sorry… it’s us screen


I do not see a command in the ‘bench’ commands for setting a site to maintenance mode. How do I do that? (and will it work on a --production site)?


Figured it out with a little experimentation. The command seems to be:

bench --site sitename set-maintenance-mode on

Thanks to @adam26d for the maintenance mode hint. That seems to have worked just right.