Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of signal Control example of Nginx

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Today, I would like to share with you the relevant knowledge points of Nginx signal control case analysis, the content is detailed, the logic is clear, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's learn about it.

Introduction to nginx

Nginx is a high-performance http and reverse proxy server, as well as a proxy server for imap/pop3/smtp. Nginx is developed by the Russian rambler.ru site, and the official test nginx can support 50, 000 concurrency.

Nginx official website:

This article mainly explains how to control nginx after running so that it can be stopped or restarted.

/ / start and stop nginx current directory: / usr/local/bin/nginx start:. / sbin/nginx stop: kill-int master host process number

Nginx semaphore

Nginx mainly uses semaphores to control nginx. The main process number is written into the file nginx.pid by default, and the name of the file can be modified by modifying the configuration file nginx.conf.

The signals supported by the nginx main process are as follows:

Semaphore usage mode

Specific explanation

Term,int: kill-term (int) nginx main process number or kill-term (int)

`cat/usr/local/nginx/logs/nginx.pid', the process of nginx is immediately shut down and cannot fully process the requests of users of the nginx being used, which is equivalent to / usr/local/nginx-s stop

The quit:kill-quit nginx main process number gracefully shuts down the nginx process, and then shuts down the nginx process after processing all nginx user requests, which is equivalent to / usr/local/nginx-s quit

Hup:kill-hup nginx main process number the nginx process does not close, but reloads the configuration file. Equivalent to / usr/local/nginx-s reload

The usr1:kill-usr1 nginx main process number can reread the log without shutting down the nginx process. This command can be used for regular backup of nginx logs, and it is useful to split the logs according to monthly / daily intervals.

When the version of usr2:kill-usr2 nginx main process number nginx needs to be upgraded, you can upgrade nginx without stopping nginx.

Winch:kill-winch nginx main process number works with usr2 to upgrade nginx, gracefully shutting down the old version of nginx process.

The above is all the contents of this article "signal Control example Analysis of Nginx". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report