PHP include class file timeout problem handling

Source: Internet
Author: User
Tags sleep

Recently found that PHP running automatically load class functions always timed out, tracking php slow query log, found that the program card in the Include a class file unexpectedly timeout.

Initial location is IO response Timeout, hard drive read problem.

Navigate through several commands:

iostat-d-x-k 1 10//Run 10 view iostat The wait parameter is large, generally no more than 5ms,await SVCTM the closer the 2 parameters, the better IO performance.

Refer to other blogs,

Await: The average time of processing per IO request (in microseconds milliseconds). This can be understood as the response time IO, the general system IO response time should be less than 5ms, if more than 10ms is relatively large.

This time includes the queue time and service time, that is to say, in general, await is greater than SVCTM, their difference is smaller, then the shorter the queue time, the other difference is larger, the longer the queue time, indicating that the system has a problem. SVCTM represents the average service time, in milliseconds, for each device I/O operation. If the value of SVCTM is close to await, which means that there is almost no I/O waiting, disk performance is good and if the await value is much higher than the SVCTM value, the I/O queue waits too long and the application running on the system slows down.

sudo iotop-o,//View the program on the hard drive, view process IO occupancy ratio

sudo perf Top//view process IO occupancy ratio

sudo hdparm-t/dev/**** view disk read efficiency

Showing: Timing buffered disk reads:10 MB in 3.14 seconds = 3.18 Mb/sec

View non-interrupted sleep

While true; do date; PS AUXF | awk ' {if ($8== "D") print $} '; Sleep 1; Done

After tracking through the above command, hard drive reading efficiency is very low, further reasons, is still unknown, guess the hard drive has bad way.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.