In the production environment, Socket error eintr is usually triggered for what reason?

Source: Internet
Author: User
Tags socket error
There is a PHP script on the line to connect a set of socket service query data, which is run every minute.

After running for a period of time in the log to find a small number of eintr errors, mainly performed to Socket_read thrown.

After reviewing the data, it is understood that the operation of the socket read is called slow system call, and when the kernel executes slow system calls, the process receives a signal during the blocking state, causing the slow system call to be interrupted, triggering a eintr error.

I would like to ask the next, in the production environment, this kind of problem is generally caused by what reason?

=====

System environment:

Os:centos 5.4
HTTP Server: Apache,worker mode, multi-process multithreading
PHP works as a module, version 5.3.22

Is it possible that the Apache worker has reached the maximum number of requests and destroyed the rebuild?

Is it possible that there is a problem with the Socket server?

Reply content:

There is a PHP script on the line to connect a set of socket service query data, which is run every minute.

After running for a period of time in the log to find a small number of eintr errors, mainly performed to Socket_read thrown.

After reviewing the data, it is understood that the operation of the socket read is called slow system call, and when the kernel executes slow system calls, the process receives a signal during the blocking state, causing the slow system call to be interrupted, triggering a eintr error.

I would like to ask the next, in the production environment, this kind of problem is generally caused by what reason?

=====

System environment:

Os:centos 5.4
HTTP Server: Apache,worker mode, multi-process multithreading
PHP works as a module, version 5.3.22

Is it possible that the Apache worker has reached the maximum number of requests and destroyed the rebuild?

Is it possible that there is a problem with the Socket server?

As long as an interrupt is encountered, it will return to EINTR, which is very normal, just go straight to read.

  • 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.