Problem: Server memory close to exhaustion alarm, ps-ef view has more than 3,000 processes, most of them are Crond, SendMail, Postdrop,
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/86/57/wKiom1e8Mlnh-_VMAAHhhlDNX-g544.png-wh_500x0-wm_3 -wmp_4-s_1616375282.png "title=" Qq20160822233402.png "alt=" Wkiom1e8mlnh-_vmaahhhldnx-g544.png-wh_50 "/>
It can be found that Postdrop is initiated by SendMail, and SendMail is initiated by Crond.
The cause of the problem: Crond the script output message to the system user when executing the script, so it is necessary to call SendMail, and SendMail will call Postdrop to send the message, but if the system's Postfix service is not working properly, Then the mail will be sent unsuccessfully, resulting in SendMail, Postdrop, Crond process will not be able to exit normally, forming a large number of zombie processes
Solution: Kill the Zombie process First Ps-ef | Egrep "Sendmail|postdrop" | Grep-v grep |xargs Kill, let memory down, in fact, I started to postfix service restarted a bit, the problem was solved, observed for some time, the zombie process did not reappear.
In order to prevent postfix hang after a similar problem, you can configure the following, Crond Mail notification closed:
Change the mailto=root in/etc/crontab and/etc/cron.d/0hourly to Mailto= ""
CRONTAB-E first line adds a mailto= ""
This article is from the "Progress a little every day" blog, be sure to keep this source http://yujia2016.blog.51cto.com/59379/1841651
Solve Crond cause a lot of sendmail, postdrop process problems