Internal Server Error on existing site

My site was working fine in the morning, until I restarted bench, after which I’ve been unable to access my website due to “Internal Server Error”.

I tried restarting bench, supervisor, nginx, mysql, and even the server, but nothing has worked.

When i try updating bench, this is the error I get:

Traceback (most recent call last):
  File "/usr/bin/bench", line 9, in <module>
    load_entry_point('bench==0.92', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/", line 60, in cli
  File "/usr/lib64/python2.7/site-packages/click/", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python2.7/site-packages/click/", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python2.7/site-packages/click/", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/", line 240, in _update
    update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/frappe/bench-repo/bench/", line 259, in update
  File "/home/frappe/bench-repo/bench/", line 88, in pull_all_apps
    exec_cmd("git pull {rebase} upstream {branch}".format(rebase=rebase, branch=get_current_branch(app, bench=bench)), cwd=app_dir)
  File "/home/frappe/bench-repo/bench/", line 104, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull  upstream master

Apart from this, my nginx error log shows an 111 “connection refused” error.

Can someone please help me out?


So, my error was actually related to

Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.

Solved it by stashing my affected dir using git:

git stash