There is an online PHP script used to connect to a set of socket services to query data. This script is run once every minute. A small number of EINTR errors are found in the log after running for a period of time, mainly caused by the execution of socket_read. After reading the information, I learned that operations such as Socket reading will call Sl... online, there is a PHP script used to connect to a set of socket services to query data. This script is run once every minute.
A small number of EINTR errors are found in the log after running for a period of time, mainly caused by the execution of socket_read.
After reading the information, I learned that operations such as Socket reading will Call Slow System Call. When the kernel executes Slow System Call, the process receives a signal when it is blocked, this will interrupt the Slow System Call and trigger the EINTR error.
I would like to ask, in the production environment, what is the cause of such problems?
=====
System Environment:
OS: centos 5.4
HTTP server: Apache, worker mode, that is, multi-process and multi-thread
PHP runs in module mode, version 5.3.22
It is suspected that Apache's worker reaches the maximum number of requests, and destruction and reconstruction are caused. Is it possible?
Is it possible that the Socket server is faulty?
Reply content:
There is an online PHP script used to connect to a set of socket services to query data. This script is run once every minute.
A small number of EINTR errors are found in the log after running for a period of time, mainly caused by the execution of socket_read.
After reading the information, I learned that operations such as Socket reading will Call Slow System Call. When the kernel executes Slow System Call, the process receives a signal when it is blocked, this will interrupt the Slow System Call and trigger the EINTR error.
I would like to ask, in the production environment, what is the cause of such problems?
=====
System Environment:
OS: centos 5.4
HTTP server: Apache, worker mode, that is, multi-process and multi-thread
PHP runs in module mode, version 5.3.22
It is suspected that Apache's worker reaches the maximum number of requests, and destruction and reconstruction are caused. Is it possible?
Is it possible that the Socket server is faulty?
The EINTR will be returned as long as an interruption occurs. This is quite normal and you can simply continue to read it.