Internal Server Error due to restore


I have two sites on a bench. I tried to restore one site’s database to another site. The restore was successful; then I tried to change the encryption key in site_config.json and now both my sites are dead. It’s giving me “Internal Server Error” .

I haven’t done anything to the first site/ it’s database/site_config. I don’t know what’s wrong; Here’s some output.

ubuntu@ip-172-31-17-94:/home/frappe/frappe-bench$ sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 2937, uptime 0:00:07
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 2936, uptime 0:00:07
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 2942, uptime 0:00:07
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 2934, uptime 0:00:07
frappe-bench-web:frappe-bench-node-socketio RUNNING pid 2935, uptime 0:00:07
frappe-bench-workers:frappe-bench-frappe-default-worker-0 RUNNING pid 2930, uptime 0:00:07
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 2932, uptime 0:00:07
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 2931, uptime 0:00:07
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 2933, uptime 0:00:07

ubuntu@ip-172-31-17-94:/home/frappe/frappe-bench$ sudo bench migrate
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/ RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn’t match a supported version!

ubuntu@ip-172-31-17-94:/home/frappe/frappe-bench$ sudo bench --site migrate
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/ RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn’t match a supported version!
Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 94, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 18, in main
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/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 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 219, in migrate
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 135, in init
local.conf = _dict(get_site_config())
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 189, in get_site_config
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 896, in get_file_json
return json.load(f)
File “/usr/lib/python2.7/json/”, line 291, in load
File “/usr/lib/python2.7/json/”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/”, line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting : delimiter: line 2 column 11 (char 12)

I’m definitely doing/did something wrong while changing the encryption key. Any help is appreciated!

No update from anyone !!! :frowning:

You might have missed something while updating in site_config.json.

Please share the site_config.json file.


Yes I understand that. But I didn’t really do anything different. I just tried to change the encryption key to the second site.

Let’s assume doing that will make the second site unavailable due to database credentials don’t match; But I didn’t touch first site’s site config file. That one should be okay.

Nevertheless; I’m doing a clean install and will try to restore the database again.

Any suggestion so that everything goes fine?


If anything goes wrong with second site’s config file,it would hamper your other sites too…

once I was getting the error Internal Server Error in my browser
in new installation
I restored the second last one backup from daily backup and increased my ram to >2

Did increasing RAM resolved the issue?

I mean, that’s nothing I think could affect the server! :frowning:

I can’t increase the RAM right now once I restore the database.

actually my problem was a little diff
I restored the last backup to a new installed erp, then the error raised again in browser
I restored the 4th last one the problem gon

I think my problem was with data in the database
and I increased the ram as well