所以,在一些睡眠连接上运行 strace 之后,我遇到了一些我已经修复的东西(从 strace 中删除)但是想知道是否有人能从这个 strace 结果中注意到其他任何东西。
这是一个 mysql 睡眠状态,当您从 ntp netstat 分析时,您可以看到一段时间后它是 CLOSE_WAIT。通常我们会打几个睡眠连接,最终将服务器磨成一半。
Process 13948 attached - interrupt to quit
read(14, "\21V\257\305\302\365\320\326", 8) = 8
close(14) = 0
mlock(0x1b50d70, 24) = 0
mlock(0xb766da80, 10624) = 0
gettimeofday({1369138768, 45552}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 187) = 187
gettimeofday({1369138768, 45621}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 195) = 195
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Cache/Backend/File.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Cache/Backend/File.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Cache/Backend/File.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Cache/Backend/File.php", {st_mode=S_IFREG|0777, st_size=34079, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend/Cache/Backend", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend/Cache", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current/lib", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/site-name", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/site-name/site-name/current/temp", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
access("/home/site-name/site-name/current/temp", W_OK) = 0
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/temp", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Cache/Core.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Cache/Core.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Cache/Core.php", 0xbfeb553c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Cache/Core.php", {st_mode=S_IFREG|0777, st_size=23895, ...}) = 0
stat64("/home/site-name/site-name/current/temp/zend_cache---internal-metadatas---published_letters_S_0_T_4_E_1", {st_mode=S_IFREG|0600, st_size=99, ...}) = 0
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/temp/zend_cache---internal-metadatas---published_letters_S_0_T_4_E_1", {st_mode=S_IFREG|0600, st_size=99, ...}) = 0
open("/home/site-name/site-name/current/temp/zend_cache---internal-metadatas---published_letters_S_0_T_4_E_1", O_RDONLY) = 14
fstat64(14, {st_mode=S_IFREG|0600, st_size=99, ...}) = 0
lseek(14, 0, SEEK_CUR) = 0
flock(14, LOCK_SH) = 0
fstat64(14, {st_mode=S_IFREG|0600, st_size=99, ...}) = 0
read(14, "a:4:{s:4:\"hash\";i:-1389558010;s:"..., 8192) = 99
read(14, "", 8192) = 0
read(14, "", 8192) = 0
flock(14, LOCK_UN) = 0
close(14) = 0
time(NULL) = 1369138768
stat64("/home/site-name/site-name/current/temp/zend_cache---published_letters_S_0_T_4_E_1", {st_mode=S_IFREG|0600, st_size=3981, ...}) = 0
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/temp/zend_cache---published_letters_S_0_T_4_E_1", {st_mode=S_IFREG|0600, st_size=3981, ...}) = 0
open("/home/site-name/site-name/current/temp/zend_cache---published_letters_S_0_T_4_E_1", O_RDONLY) = 14
fstat64(14, {st_mode=S_IFREG|0600, st_size=3981, ...}) = 0
lseek(14, 0, SEEK_CUR) = 0
flock(14, LOCK_SH) = 0
fstat64(14, {st_mode=S_IFREG|0600, st_size=3981, ...}) = 0
read(14, "s:3971:\"a:2:{s:7:\"results\";a:4:{"..., 8192) = 3981
read(14, "", 8192) = 0
read(14, "", 8192) = 0
flock(14, LOCK_UN) = 0
close(14) = 0
time(NULL) = 1369138768
gettimeofday({1369138768, 47925}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 521) = 521
time(NULL) = 1369138768
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 48061}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 516) = 516
time(NULL) = 1369138768
gettimeofday({1369138768, 48154}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 516) = 516
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 48295}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 493) = 493
time(NULL) = 1369138768
gettimeofday({1369138768, 48412}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 499) = 499
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 48530}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 499) = 499
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 48642}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 499) = 499
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 48751}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 499) = 499
time(NULL) = 1369138768
time(NULL) = 1369138768
time(NULL) = 1369138768
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/app/models/Member.php", {st_mode=S_IFREG|0777, st_size=21802, ...}) = 0
lstat64("/home/site-name/site-name/current/app/models", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current/app", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
poll([{fd=13, events=POLLIN|POLLPRI}], 1, 0) = 1 ([{fd=13, revents=POLLIN}])
read(13, "", 8192) = 0
shutdown(13, 2 /* send and receive */) = 0
close(13) = 0
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Db/Statement/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Db/Statement/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Db/Statement/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Db/Statement/Exception.php", {st_mode=S_IFREG|0777, st_size=1569, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend/Db/Statement", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend/Db", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
time(NULL) = 1369138768
open("/home/site-name/site-name/current/lib/Zend/Db/Statement/Exception.php", O_RDONLY) = 13
fstat64(13, {st_mode=S_IFREG|0777, st_size=1569, ...}) = 0
fstat64(13, {st_mode=S_IFREG|0777, st_size=1569, ...}) = 0
fstat64(13, {st_mode=S_IFREG|0777, st_size=1569, ...}) = 0
mmap2(NULL, 1569, PROT_READ, MAP_SHARED, 13, 0) = 0xb76fb000
munmap(0xb76fb000, 1569) = 0
close(13) = 0
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Db/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Db/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Db/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Db/Exception.php", {st_mode=S_IFREG|0777, st_size=1076, ...}) = 0
time(NULL) = 1369138768
open("/home/site-name/site-name/current/lib/Zend/Db/Exception.php", O_RDONLY) = 13
fstat64(13, {st_mode=S_IFREG|0777, st_size=1076, ...}) = 0
fstat64(13, {st_mode=S_IFREG|0777, st_size=1076, ...}) = 0
fstat64(13, {st_mode=S_IFREG|0777, st_size=1076, ...}) = 0
mmap2(NULL, 1076, PROT_READ, MAP_SHARED, 13, 0) = 0xb76fb000
munmap(0xb76fb000, 1076) = 0
close(13) = 0
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Exception.php", 0xbfeb552c) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Exception.php", {st_mode=S_IFREG|0777, st_size=2659, ...}) = 0
time(NULL) = 1369138768
time(NULL) = 1369138768
gettimeofday({1369138768, 51202}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 489) = 489
getcwd("/home/site-name/site-name/current/www", 4096) = 39
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/www/./Zend/Db/Statement/Exception.php", 0xbfeb51bc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Db/Statement/Exception.php", 0xbfeb51bc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Db/Statement/Exception.php", 0xbfeb51bc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
gettimeofday({1369138768, 51837}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 1189) = 1189
chdir("/") = 0
time(NULL) = 1369138768
getcwd("/", 4096) = 2
time(NULL) = 1369138768
lstat64("//./Zend/Db/Table/Select.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Db/Table/Select.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Db/Table/Select.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/home/site-name/site-name/current/lib/Zend/Db/Table/Select.php", {st_mode=S_IFREG|0777, st_size=6665, ...}) = 0
lstat64("/home/site-name/site-name/current/lib/Zend/Db/Table", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
getcwd("/", 4096) = 2
time(NULL) = 1369138768
lstat64("//./Zend/Db/Statement/Exception.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/pear/Zend/Db/Statement/Exception.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
lstat64("/usr/share/php/Zend/Db/Statement/Exception.php", 0xbfeb6ccc) = -1 ENOENT (No such file or directory)
time(NULL) = 1369138768
gettimeofday({1369138768, 52798}, NULL) = 0
write(2, "[Tue May 21 07:19:28 2013] [erro"..., 136) = 136
munlock(0x1b50d70, 24) = 0
munlock(0xb766da80, 10624) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
writev(12, [{"HTTP/1.0 500 Internal Server Err"..., 466}, {"\37\213\10\0\0\0\0\0\0\3", 10}, {"\3\0", 2}, {"\0\0\0\0\0\0\0\0", 8}], 4) = 486
write(9, "wwww.sitename.com - - -"..., 223) = 223
shutdown(12, 1 /* send */) = 0
poll([{fd=12, events=POLLIN}], 1, 2000) = 1 ([{fd=12, revents=POLLIN|POLLHUP}])
read(12, "", 512) = 0
close(12) = 0
read(5, 0xbfebbf8f, 1) = -1 EAGAIN (Resource temporarily unavailable)