Supervisor and bench start

Why bench start runs my custom app on erpnext but supervisor doesn’t??

1 Like

You have two options as I see it:

  1. Read up on services, servers, what is bench and how it works. (I’m assuming you wont do this so refer to option 2.)
  2. Bench must be running for any frappe app to work, be it ERPNext or your custom app. bench start will have bench running and you will be able to access your app.
1 Like

I think I’m not explaining right. As I see, there are 2 ways to launch all the ERPNext environment:
1- using “bench start”
2-using “supervisorctl start all”

When I use option 1 I can see my app in erpnext, but when I use option 2 I can not. Why??

What do you mean you can “see” your app in ERPNext? Discuss your issue in detail.

I have a working installation of erpnext v12 production.
I have created a new (empty) app and installed it on the site Im using.
If I start erpnext using “supervisorctl start all” and go to “Module def” section I can not see my new empty app.
If I stop supervisor and launch bench start and then goto to “Module def” I can see my new empty app and can create doctype in it.

Then use bench start? If it works, it works. If you’re adamant about using supervisorctl start all, check your error logs and study them for aberrations.

My erpnext is online and I can only access with ssh. How can I keep it running when I close ssh connection??

If your instance is on a live server, run bench start and don’t power the server/machine down. In simple terms, if bench is running and you don’t stop it ( i.e by powering the machine/server off) your ERPNext will remain live.

As to accessing ERPNext only with an SSH connection, that is not a favoured way of running ERPNext. I don’t know the exact semantics of this situation, so I cannot comment on this. I would suggest migrating to a live server with a domain pointed to your bench site (If you want to access ERPNext on a domain i.e www.yourerpnextsite.com )

Got your fix, run bench in production mode,
https://frappeframework.com/docs/user/en/bench/guides/setup-production