hansedong commented on issue #7078:
URL: https://github.com/apache/apisix/issues/7078#issuecomment-1132390037

   > How many APISIX worker processed that you created?
   
   ```
   [root@knode10-132-15-138 operation]# ps -ef |grep nginx
   root     13648     1  0 May18 ?        00:00:00 nginx: master process 
openresty -p /usr/local/apisix -c /usr/local/apisix/conf/nginx.conf
   nobody   13649 13648  0 May18 ?        00:05:46 nginx: worker process
   nobody   13650 13648  0 May18 ?        00:06:22 nginx: worker process
   nobody   13651 13648  0 May18 ?        00:05:50 nginx: worker process
   nobody   13652 13648  0 May18 ?        00:05:46 nginx: worker process
   nobody   13653 13648  0 May18 ?        00:05:46 nginx: worker process
   nobody   13654 13648  0 May18 ?        00:05:52 nginx: worker process
   nobody   13655 13648  0 May18 ?        00:06:06 nginx: worker process
   nobody   13656 13648  0 May18 ?        00:06:03 nginx: worker process
   nobody   13657 13648  0 May18 ?        00:00:00 nginx: cache manager process
   root     13659 13648  0 May18 ?        00:05:43 nginx: privileged agent 
process
   ```
   
   The CPU of my host is 8 cores, so the number of nginx workers is 8. My 
apisix configuration is as follows, and the number of workers is as expected:
   
   ```yaml
   nginx_config:                     # config for render the template to 
generate nginx.conf
     #user: root                     # specifies the execution user of the 
worker process.
                                     # the "user" directive makes sense only if 
the master process runs with super-user privileges.
                                     # if you're not root user,the default is 
current user.
     error_log: /DATA1/apisix/logs/error.log
     error_log_level:  warn          # warn,error
     worker_processes: auto          # if you want use multiple cores in 
container, you can inject the number of cpu as environment variable 
"APISIX_WORKER_PROCESSES"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to