Error
Today, the line encountered a fault, PHP because of the paragraph error exited, the system log kernel error is as follows:
Feb 25 22:25:11 web_server_01 kernel: __ratelimit: 250 callbacks suppressed
Feb 25 22:25:11 web_server_01 kernel: php-fpm[25942]: segfault at 2c6 ip 00000000000002c6 sp 00007fffdcf9e798 error 14 in php-fpm[400000+a3b000]
Inquire
For __ratelimit:250 callbacks suppressed the cause of the error is not very understanding, then made a query, record:
__ratelimit:n callbacks suppressed indicates that the kernel blocks N syslog messages because the system repeats too many logs (too often), outputs too quickly, and the syslog message is limited by the Net_ratelimit () in the kernel.
Source Code Reference: http://fxr.watson.org/fxr/source/lib/ratelimit.c?v=linux-2.6
This rate limit is also a mechanism for Linux to avoid Dos attacks, preventing each message from being logged (which can cause a burst of storage space). When the kernel logs messages, use PRINTK () to check whether the log is output.
This restriction can be tuned by/proc/sys/kernel/printk_ratelimit and/proc/sys/kernel/printk_ratelimit_burst. The default configuration (RHEL6) is 5 and 10, respectively. In other words, the kernel allows 10 messages to be logged every 5 seconds. Beyond this limit, the kernel discards the log and logs Ratelimit N:callbacks suppressed.
[[email protected]_server_01 ~]# cat /proc/sys/kernel/printk_ratelimit
5
[[email protected]_server_01 ~]# cat /proc/sys/kernel/printk_ratelimit_burst
10
[[email protected]_server_01 ~]#
However, the kernel's network code has its own limited configuration (logically identical, but independent)/proc/sys/net/core/message_cost and/proc/sys/net/core/message_burst, and the default configuration is also 5 and 10. Here Message_cost is also the log sampling time.
[[email protected]_server_01 ~]# cat /proc/sys/net/core/message_cost
5
[[email protected]_server_01 ~]# cat /proc/sys/net/core/message_burst
10
[[email protected]_server_01 ~]#
If you want to turn off the ratelimit mechanism, which is to allow each message to be logged, you can set the Message_cost value to 0
Sysctl-w net.core.message_cost=0
However, once Ratelimit is turned off, there is a risk that the system will be attacked by logs.
Reference Link: https://huataihuang.gitbooks.io/cloud-atlas/content/os/linux/kernel/log/ratelimit.html
Linux System log __ratelimit:n callbacks suppressed