In the production environment, what causes the Socket error EINTR to be triggered?

Source: Internet
Author: User
Tags socket error
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.

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.