I’ve installed ERPNext with the ‘easy install’ script method.
It has set ERPNext to come up automatically on a reboot, so ‘bench start’ is not needed.
I commonly find that a server reboot is necessary - particularly when modifying *.py files in my custom app, because those changes do not always reload as expected.
I find that when I’ve restarted the server using ‘sudo reboot’ it sometimes leaves ERPNext displaying a ‘Internal Server Error’ that can only be released by running the following commands
sudo mysqld --tc-heuristic-recover=ROLLBACK
sudo service mysql start
What is the ‘accepted or suggested’ method of shutting down/restarting ERPNext, when not launched by ‘bench start’?
Sounds like you are not running in production mode. When you run easy install what arguments are you passing in?
When I installed 11.1.14 some time ago from scratch I think I used this - just following along and not really understanding what the implications were (still not understanding the implications)
python install.py --develop --user frappe
Edit - I understand that --develop sets developer vs production mode, and I recogonize --user frappe creates the frappe user. But why would I use production over developer? does production mode use ‘bench start’ and developer autostart?
I did this a while ago - I think I’ve mixed up --production and --develop
I must have used – production
Here’s the site I was looking at
in the readme.md it says this in the’How do I start ERPNext’ section:
For development: Go to your bench folder (frappe-bench by default) and start the bench with bench start
For production: Your process will be setup and managed by nginx and supervisor. Setup Production
SO: I think I understand the mode now.
I may just change to developer mode and begin using ‘bench start’ to start and ctl-c to stop, but if I stay on production, what is the suggested reboot method? What command restarts or stops the ‘supervisor’ process?
I believe this does what I want for a --production easy install reboot
(in a new terminal window)
sudo supervisorctl stop all
sudo reboot (or just ‘sudo supervisorctl start all’ if the os reboot isn’t needed)