Precautions for using a supervisor

Source: Internet
Author: User

Precautions for using a supervisor

It has always been the use of supervisor to manage service processes on linux. Recently, some colleagues said that a service seems to be faulty. Let's check it out. After going up, I found that the response to a service was really slow, so I restarted it with the supervisor. However, the problem was discovered during the restart, and the operation can be completed in one or two seconds. Now it takes several minutes! This is very unscientific. Check the reason!
At first, I wondered whether there was a problem with the file system and whether I/O would be too high. After exclusion, check the supervisor process and find that the cpu is high. This is strange. The cpu usage of the supervisor on other servers is very low. Why? Then compare the processes managed by the supervisor on the two machines. Finally, we found that on the faulty machine, some processes managed by the supervisor had a large number of frequent stdout outputs (tornado is used here, default logs are output to stdout ). When many processes output a large number of stdout at the same time, the supervisor will be exhausted in processing the output data and recording logs, and eventually lead to slow processing by the supervisor.

After the logger output mode of the managed program is adjusted, the supervisor will return to normal immediately.
Therefore, when using a supervisor, it is best to avoid a large number of frequent stdout or stderr outputs in the managed program. Otherwise, problems may occur in the management.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.