How to fix: Sorry! We will be back soon

Hello Community ,
I had a problem weeks after working with the ERP , it gave me this message : Sorry!
We will be back soon.
I tried to update the system but it doesn’t solve the problem

bench migrate

There are many possible causes, but the most frequent is when you have altered the site_config.json file (either manually or automated by use of other function scripts).

Even after a “bench migrate” you will not always have success.

So, it is always best to “additionally” run the following commands:

bench setup nginx
sudo service nginx restart
bench --site site1.local enable-scheduler

(Of course replace site1.local with your site name)

If you make these additional commands a habit before you logout of your server maintenance, then you should always have a successful restart.

Hope this helps… (I had to make it mandatory for all of my techs when they work on sites)


thank you for your reply , when I try to get my site name with " from frappe.utils import get_site_name " and then “site_name = get_site_name(” it gives me " -bash: from: command not found " ,

To get your site name simply cd into your bench folder then check what is in sites:

ls sites

I tried this , but it gave me those errors :
Traceback (most recent call last):
File “/usr/lib64/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 97, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 18, in main
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 43, in enable_scheduler
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 239, in enable_scheduler
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 236, in toggle_scheduler
frappe.db.set_value(“System Settings”, None, “enable_scheduler”, 1 if enable else 0)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 623, in set_value
modified = now()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 159, in now
return now_datetime().strftime(DATETIME_FORMAT)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 126, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 149, in convert_utc_to_user_timezone
return utcnow.astimezone(timezone(get_time_zone()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 143, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 79, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 137, in _get_time_zone
return frappe.db.get_system_setting(‘time_zone’) or ‘Asia/Kolkata’ # Default to India ?!
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 880, in get_system_setting
return frappe.cache().get_value(“system_settings”, _load_system_settings).get(key)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 79, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 879, in _load_system_settings
return self.get_singles_dict(“System Settings”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 518, in get_singles_dict
“”“, doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 122, in sql
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/”, line 75, in connect
self._conn = self.get_connection()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/”, line 96, in get_connection
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/pymysql/”, line 446, in select_db
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/pymysql/”, line 394, in _read_ok_packet
pkt = self._read_packet()
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/pymysql/”, line 684, in _read_packet
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/pymysql/”, line 220, in check_error
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/pymysql/”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1049, u"Unknown database ‘_87a197e4ad4f350d’”)

Is your environment setup in production or only on development ?
You could verify your site_config.json to get database_name and if it’s in you mariadb database

I suppose here that your environment is not started.

this gave me a weird output

lok@abc-comp:~/frappe-bench$ sudo service nginx restart
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

Did you run the:

bench setup nginx

and did it also give an error?


Seems your site-config.json is not right or your database is ko

1 Like

@bkm I have had this same problem for the past 3 weeks. I am hosted on google cloud. My SSH is not connecting to the VM so am not able to run the commands above. I need help!!! I have lots of transaction stacked in it

for me, it got resolved after running bench migrate (though it failed)

similar/duplicate issue references: