-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: make stop can't kill multi apisix server #1671
Comments
Hi, the logic for 'make stop' is based on the 'nginx.pid' file. openresty processes, rather than stopping all openresty processes, so the 'make stop' stops only a group of openresty processes |
On the other hand, I think the root cause of the problem is that multiple 'make run' or 'apisix start' will start multiple groups of apisix processes |
I think the point we should be discussing is whether multiple 'apisix starts' should only start a set of apisix processes |
In my point of view, i think in the current stage of apisix, it is meaningless to start multiple apisix server with make run command, cuz only can access one at a time |
@nerowangtc is this issue same as #1663? |
@moonming It'looks like the same |
@nerowangtc got it, it's a bug when enabled |
fixed |
Issue description
If I use make run to start multiple apisix server, the process shows below:
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29053 1 0 10:40 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
Now if i use make stop to stop a apisxi server , it goes ok
[nero@VM_42_81_centos ~/incubator-apisix]$ make stop
/usr/local/openresty/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29362 28108 0 10:42 pts/0 00:00:00 grep --color=auto apisix
But if is make stop again, it produce a error message
[nero@VM_42_81_centos ~/incubator-apisix]$ make stop
/usr/local/openresty/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
nginx: [error] open() "/home/nero/incubator-apisix/logs/nginx.pid" failed (2: No such file or directory)
make: *** [stop] Error 1
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29421 28108 0 10:42 pts/0 00:00:00 grep --color=auto apisix
and the another apisix process remains
I think this is a bug if some one missuse this command
Environment
apisix version
):Minimal test code / Steps to reproduce the issue
What's the actual result? (including assertion message & call stack if applicable)
What's the expected result?
The text was updated successfully, but these errors were encountered: