Stop production

Hi everyone,

I’m a little bit lost on how to "stop production"process of frappe on a server. To be clear:
1- I launch the production using: sudo bench setup production user
2- I try to go back to development mode…
How can I do that?

You should do:

  1. service nginx stop
  2. service supervisord stop
  3. cd frappe-bench
  4. bench setup procfile
  5. bench start

@pdvyas does this cover everything?

2 Likes
cd frappe-bench
rm config/supervisor.conf
rm config/nginx.conf
service nginx stop
service supervisord stop
bench start
3 Likes

Working thanks!!
Just corrected a typo line 5 and added sudo line 4 and 5:

cd frappe-bench
rm config/supervisor.conf
rm config/nginx.conf
sudo service nginx stop
sudo service supervisor stop
bench start
5 Likes

Heu… in fact the command lines before effectively shut down production and start bench in dev mode again. But then when I try to start production again:

xxx@xxx:~$ sudo bench setup production laurent

I have the following error. Any idea why?

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/laurent/bench-repo/bench/cli.py", line 60, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/laurent/bench-repo/bench/cli.py", line 456, in setup_production
    _setup_production(user=user)
  File "/home/laurent/bench-repo/bench/production_setup.py", line 64, in setup_production
    os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), os.path.join(get_supervisor_confdir(), supervisor_conf_filename))
OSError: [Errno 17] File exists