Hello,
Is it possible to create multiple instance of bench with different versions on one server ?
Regards,
Harsh Mehta
Hello,
Is it possible to create multiple instance of bench with different versions on one server ?
Regards,
Harsh Mehta
Yes, it is possible to setup multiple benches on one server.
I’ve one master bench and one develop bench on my machine.
How u do that pls I am in need to do this I m currently in develop branch and using the same for public use for my organization If I could use seperately then it will be very helpful.
thanx in advance
Hi revant_one,
they both bench have different versions ? And if it have then can you give us a step for installing multiple versions of bench on one server and how you have managed bench file in server bin directory ?
Regards,
Harsh Mehta
I have the same question.
I am currently using multiple benches on my development machine. This is easy, because i am using only one bench at time, which i start with ‘bench start’ while developing.
The 1000$-Question is now how to setup multiple benches in production mode on one server.
This use case is different, because these multiple benches are sharing the nginx and so far while they are running parallel.
I have no idea how to setup this scenario.
It is very important for setting up staging environments (dev/test/production) on one server.
I’m also using it for development.
Production environment I haven’t tried.
What I can think of is setting up production benches and linking config files as per the bench names.
https://frappe.github.io/frappe/user/en/bench/guides/setup-production.html
e.g. for supervisor setup
cd ~/frappe-bench-master
bench setup supervisor
sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench-master.conf
cd ~/frappe-bench-develop
bench setup supervisor
sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench-develop.conf
repeat this with nginx
For setting up multiple benches this I used :
bench init frappe-bench-1
bench init frappe-bench-2
bench init frappe-bench-3
Hello revant_one,
Can you give me steps for install multiple version of bench for development server.
Should we need multiple bench for production.
We have separate bench for every frappe-bench, but schedular is not working properly .
there must be multiple processes running for sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 1813, uptime 53 days, 6:12:43
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 1812, uptime 53 days, 6:12:43
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 1814, uptime 53 days, 6:12:43
frappe-bench-test-redis:frappe-bench-test-redis-cache RUNNING pid 1816, uptime 53 days, 6:12:43
frappe-bench-test-redis:frappe-bench-test-redis-queue RUNNING pid 1819, uptime 53 days, 6:12:43
frappe-bench-test-redis:frappe-bench-test-redis-socketio RUNNING pid 1815, uptime 53 days, 6:12:43
frappe-bench-test-web:frappe-bench-test-frappe-web RUNNING pid 13889, uptime 1 day, 3:20:03
frappe-bench-test-web:frappe-bench-test-node-socketio RUNNING pid 13892, uptime 1 day, 3:20:03
frappe-bench-test-workers:frappe-bench-test-frappe-default-worker-0 RUNNING pid 13869, uptime 1 day, 3:20:04
frappe-bench-test-workers:frappe-bench-test-frappe-long-worker-0 RUNNING pid 13868, uptime 1 day, 3:20:04
frappe-bench-test-workers:frappe-bench-test-frappe-schedule RUNNING pid 13867, uptime 1 day, 3:20:04
frappe-bench-test-workers:frappe-bench-test-frappe-short-worker-0 RUNNING pid 13870, uptime 1 day, 3:20:04
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 13588, uptime 1 day, 3:21:46
frappe-bench-web:frappe-bench-node-socketio RUNNING pid 13591, uptime 1 day, 3:21:46
frappe-bench-workers:frappe-bench-frappe-default-worker-0 RUNNING pid 13569, uptime 1 day, 3:21:47
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 13570, uptime 1 day, 3:21:47
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 13568, uptime 1 day, 3:21:47
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 13571, uptime 1 day, 3:21:47
executing bench console
in different frappe-bench-* directories starts the respective frappe-bench environment
does executing python functions via separate bench console work as expected?
here is output.
Process frappe-worker and web is running.
ERPNext is running fine, we have issue with email sending.
If we send email, then some time its not send, some time its delivery after 1day(approximate)
frappe@dpierp:~$ sudo supervisorctl status
clfrappe-bench-redis:clfrappe-bench-redis-cache FATAL Exited too quickly (process log may have details)
clfrappe-bench-redis:clfrappe-bench-redis-queue FATAL Exited too quickly (process log may have details)
clfrappe-bench-redis:clfrappe-bench-redis-socketio FATAL Exited too quickly (process log may have details)
clfrappe-bench-web:clfrappe-bench-frappe-web RUNNING pid 19971, uptime 0:00:49
clfrappe-bench-web:clfrappe-bench-node-socketio FATAL Exited too quickly (process log may have details)
clfrappe-bench-workers:clfrappe-bench-frappe-default-worker-0 RUNNING pid 20086, uptime 0:00:45
clfrappe-bench-workers:clfrappe-bench-frappe-long-worker-0 RUNNING pid 20049, uptime 0:00:46
clfrappe-bench-workers:clfrappe-bench-frappe-schedule RUNNING pid 20042, uptime 0:00:46
clfrappe-bench-workers:clfrappe-bench-frappe-short-worker-0 RUNNING pid 20076, uptime 0:00:45
frappe-bench-redis:frappe-bench-redis-cache FATAL Exited too quickly (process log may have details)
frappe-bench-redis:frappe-bench-redis-queue FATAL Exited too quickly (process log may have details)
frappe-bench-redis:frappe-bench-redis-socketio FATAL Exited too quickly (process log may have details)
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 20000, uptime 0:00:47
frappe-bench-web:frappe-bench-node-socketio FATAL Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-default-worker-0 RUNNING pid 20102, uptime 0:00:44
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 20136, uptime 0:00:44
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 20094, uptime 0:00:45
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 20161, uptime 0:00:43
haffrappe-bench-redis:haffrappe-bench-redis-cache RUNNING pid 19887, uptime 0:00:57
haffrappe-bench-redis:haffrappe-bench-redis-queue RUNNING pid 19882, uptime 0:00:58
haffrappe-bench-redis:haffrappe-bench-redis-socketio RUNNING pid 19881, uptime 0:00:58
haffrappe-bench-web:haffrappe-bench-frappe-web RUNNING pid 20025, uptime 0:00:46
haffrappe-bench-web:haffrappe-bench-node-socketio FATAL Exited too quickly (process log may have details)
haffrappe-bench-workers:haffrappe-bench-frappe-default-worker-0 RUNNING pid 20212, uptime 0:00:42
haffrappe-bench-workers:haffrappe-bench-frappe-long-worker-0 RUNNING pid 20197, uptime 0:00:42
haffrappe-bench-workers:haffrappe-bench-frappe-schedule RUNNING pid 20180, uptime 0:00:43
haffrappe-bench-workers:haffrappe-bench-frappe-short-worker-0 RUNNING pid 20229, uptime 0:00:42
hrfrappe-bench-redis:hrfrappe-bench-redis-cache FATAL Exited too quickly (process log may have details)
hrfrappe-bench-redis:hrfrappe-bench-redis-queue FATAL Exited too quickly (process log may have details)
hrfrappe-bench-redis:hrfrappe-bench-redis-socketio FATAL Exited too quickly (process log may have details)
hrfrappe-bench-web:hrfrappe-bench-frappe-web RUNNING pid 19932, uptime 0:00:52
hrfrappe-bench-web:hrfrappe-bench-node-socketio RUNNING pid 19941, uptime 0:00:51
hrfrappe-bench-workers:hrfrappe-bench-frappe-default-worker-0 RUNNING pid 19899, uptime 0:00:55
hrfrappe-bench-workers:hrfrappe-bench-frappe-long-worker-0 RUNNING pid 19910, uptime 0:00:54
hrfrappe-bench-workers:hrfrappe-bench-frappe-schedule RUNNING pid 19890, uptime 0:00:56
hrfrappe-bench-workers:hrfrappe-bench-frappe-short-worker-0 RUNNING pid 19921, uptime 0:00:53
frappe@dpierp:~$
can you try setting different ports for redis_*.conf?
e.g.
frappe-bench/config/redis_.conf has ports 11000, 12000, 13000
haffrappe-bench/config/redis_.conf has ports 11001, 12001, 13001
clfrappe-bench/config/redis_*.conf has ports 11002, 12002, 13002
@revant_one
Thanks, thats my core question.
I have setup different port and process name, Now I have also setup different port for redis.
Now, one more question, in nginx config I have changes 8000 to 8001, should I change 9000 to 9001 (socket port)
@revant_one thanks
I have done single bench and multi frappe on one server,
Now all process are running.
There is still lac of configuration & setup document,
I have updated following two wiki, it will help if some one can review it.
Now we are facing new issue.
Mysql stopped working after some interval.
Error is Can not allocate memory
I have checked this, Erpnext is Hanging upto 30 minutes. We are using AWS-4 Cores & memory 16GB - #3 by Kagabuisa
But doesn’t get any solution.
As you keep adding running benches memory consumption will increase.
Check it with 0,1,2,n benches
run command
free -h
Allocate more memory.
Temporary fix, add Swap refer : https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
If you are planning to keep adding more benches, separate file storage, database and compute.
Hi,
think that you are better off using docker to launch multiple instances of bench.
Is this something people would find useful? I can release my docker images if there is demand… it currently is baked in with my infrastructure keys. Will do it if there are 10 likes!
Is it solve if we use 16GB RAM & 256 GB SSD.
On this current server we have 2GB RAM.
frappe@DigitalPrizm-ubuntu-2gb-sgp1-01:/root$ free -h
total used free shared buffers cached
Mem: 2.0G 1.7G 286M 332K 18M 366M
-/+ buffers/cache: 1.3G 671M
Swap: 0B 0B 0B