请帮我看下 "OS X 下 php-fpm cpu 100%" 的问题.
机器上的 nginx+php-fpm 偶尔会遇到cpu 100%的情况. 如果不强行kill进程,则一直那样了.
strace(OSX下用的dtruss) 就显示
SYSCALL(args) = return
我是看不出什么.
下面是活动监视器的进程取样. 请高手帮我看看吧.
Analysis of sampling php-fpm (pid 58179) every 1 millisecond Process: php-fpm [58179] Path: /opt/local/sbin/php-fpm Load Address: 0x10eb86000 Identifier: php-fpm Version: ??? (???) Code Type: X86-64 (Native) Parent Process: daemondo [58178] Date/Time: 2012-09-02 02:52:14.946 +0800 OS Version: Mac OS X 10.8.1 (12B19) Report Version: 7 Call graph: 2587 Thread_649875 DispatchQueue_1: com.apple.main-thread (serial) 2587 start (in libdyld.dylib) + 1 [0x7fff954a77e1] 2587 main (in php-fpm) + 1823 [0x10edcca2f] 2587 fpm_init (in php-fpm) + 123 [0x10edc50ab] 2587 fpm_unix_init_main (in php-fpm) + 410 [0x10edd2f9a] 2587 fpm_cleanups_run (in php-fpm) + 80 [0x10edc5d00] 2587 fpm_php_cleanup (in php-fpm) + 9 [0x10edce2e9] 2587 php_module_shutdown (in php-fpm) + 35 [0x10ecf7f33] 2587 zend_shutdown (in php-fpm) + 38 [0x10ed4ab76] 2587 zend_hash_graceful_reverse_destroy (in php-fpm) + 40 [0x10ed55f68] 2587 zend_hash_apply_deleter (in php-fpm) + 180 [0x10ed55d34] 2587 module_destructor (in php-fpm) + 268 [0x10ed5048c] 2587 dlclose (in libdyld.dylib) + 61 [0x7fff954a6d8b] 2587 dlclose (in dyld) + 131 [0x7fff6e7905c8] 2587 dyld::garbageCollectImages() (in dyld) + 92 [0x7fff6e78ad96] 2587 dyld::removeImage(ImageLoader*) (in dyld) + 490 [0x7fff6e787c6d] 2587 memcpy$VARIANT$sse3x (in dyld) + 1 [0x7fff6e7a2989] 2587 _sigtramp (in libsystem_c.dylib) + 26 [0x7fff92a3a92a] 2587 fpm_signals_sighandler_exit_config (in php-fpm) + 14 [0x10edd07fe] 2587 exit (in libsystem_c.dylib) + 15 [0x7fff92a94f83] 2587 __cxa_finalize (in libsystem_c.dylib) + 200 [0x7fff92a93333] 2587 dyld::runTerminators(void*) (in dyld) + 125 [0x7fff6e78809c] 2389 OSAtomicCompareAndSwap64$VARIANT$mp (in dyld) + 8,0,... [0x7fff6e7a37ec,0x7fff6e7a37e4,...] 198 dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in dyld) + 203,218 [0x7fff6e78a768,0x7fff6e78a777] Total number in stack (recursive counted multiple, when >=5): Sort by top of stack, same collapsed (when >= 5): OSAtomicCompareAndSwap64$VARIANT$mp (in dyld) 2389 dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in dyld) 198 Binary Images: 0x10eb86000 - 0x10f0f3ff7 +php-fpm (??? - ???) <A08FBAD1-FCD4-36DA-AE20-16D1C3C8D4C6> /opt/local/sbin/php-fpm 0x10f1cf000 - 0x10f1f5fff +libreadline.6.2.dylib (6.2.0 - compatibility 6.0.0) <57F6C0B9-8488-35C0-865C-ADE03EF8EE8E> /opt/local/lib/libreadline.6.2.dylib 0x10f20d000 - 0x10f24afff +libncurses.5.dylib (5.0.0 - compatibility 5.0.0) <B3366DD0-F231-3C4A-81CA-1EBFAB60B405> /opt/local/lib/libncurses.5.dylib 0x10f25d000 - 0x10f26bff7 +libbz2.1.0.dylib (1.0.6 - compatibility 1.0.0) <7E9D3772-91BF-35F6-8090-36639397A324> /opt/local/lib/libbz2.1.0.dylib 0x10f276000 - 0x10f287ff7 +libz.1.dylib (1.2.7 - compatibility 1.0.0) <5C19DDF1-1736-3CE0-9505-C7C555C9B125> /opt/local/lib/libz.1.dylib 0x10f28c000 - 0x10f2c2ff7 +libpcre.1.dylib (2.0.0 - compatibility 2.0.0) <BD662A67-77F7-3077-91C7-69A7115D91AF> /opt/local/lib/libpcre.1.dylib 0x10f2c6000 - 0x10f3f3fff +libxml2.2.dylib (10.8.0 - compatibility 10.0.0) <445E8D69-C8F6-34FA-ADBA-6A203B15ABE4> /opt/local/lib/libxml2.2.dylib 0x10f42a000 - 0x10f522ff7 +libiconv.2.dylib (8.1.0 - compatibility 8.0.0) <65216A67-4CD5-31D6-AF00-023FAC2E6E08> /opt/local/lib/libiconv.2.dylib 0x10f5ec000 - 0x10f5f7ff7 +curl.so (??? - ???) <BF76C90A-EDD2-3417-8E0A-1F60E6858BAF> /opt/local/lib/php/extensions/no-debug-non-zts-20090626/curl.so 0x10f5fd000 - 0x10f647ff7 +libcurl.4.dylib (7.0.0 - compatibility 7.0.0) <00362215-76A1-3FA2-B0D2-6EBF98909AF2> /opt/local/lib/libcurl.4.dylib 0x10f654000 - 0x10f65cfff +libintl.8.dylib (10.1.0 - compatibility 10.0.0) <B698353C-6F1C-3BFA-88FA-C2B9DC5CCDB0> /opt/local/lib/libintl.8.dylib 0x10f661000 - 0x10f6a6ff7 +libssl.1.0.0.dylib (??? - ???) <214E1710-746C-3FCA-806F-43E26B651FD7> /opt/local/lib/libssl.1.0.0.dylib 0x10f6bf000 - 0x10f7f2fff +libcrypto.1.0.0.dylib (??? - ???) <CB77FCB5-4911-3AD7-851E-5EEE89CE1457> /opt/local/lib/libcrypto.1.0.0.dylib 0x10f861000 - 0x10f88ffff +libidn.11.dylib (18.8.0 - compatibility 18.0.0) <B842C8A3-E116-3F77-B8E8-1B68BE8B3F28> /opt/local/lib/libidn.11.dylib 0x7fff6e786000 - 0x7fff6e7ba93f dyld (210.2 - ???) <A40597AA-5529-3337-8C09-D8A014EB1578> /usr/lib/dyld 0x7fff8e281000 - 0x7fff8e287ff7 libunwind.dylib (35.1.0 - compatibility 1.0.0) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib 0x7fff8e49f000 - 0x7fff8e4a0ff7 libremovefile.dylib (23.1.0 - compatibility 1.0.0) <DBBFAF35-AC78-3856-92F6-6E4FD9DF14A2> /usr/lib/system/libremovefile.dylib 0x7fff8f4d4000 - 0x7fff8f4e2ff7 libsystem_network.dylib (??? - ???) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib 0x7fff8f65b000 - 0x7fff8f844fff com.apple.CoreFoundation (6.8 - 744) <47AEA7C7-EF9B-3FC6-AEBF-CE02FC650301> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff8fd85000 - 0x7fff8ff85fff libicucore.A.dylib (49.1.0 - compatibility 1.0.0) <17E8B610-6B16-3F91-B49C-7CAE0D08E9CF> /usr/lib/libicucore.A.dylib 0x7fff9195a000 - 0x7fff91988ff7 libsystem_m.dylib (??? - ???) <B434BE5C-25AB-3EBD-BAA7-5304B34E3441> /usr/lib/system/libsystem_m.dylib 0x7fff925ea000 - 0x7fff925f8fff libcommonCrypto.dylib (50000.0.0 - compatibility 1.0.0) <2D6537F5-1B5E-305C-A1CF-D1FA80CA3939> /usr/lib/system/libcommonCrypto.dylib 0x7fff925f9000 - 0x7fff92600fff libcopyfile.dylib (89.0.0 - compatibility 1.0.0) <876573D0-E907-3566-A108-577EAD1B6182> /usr/lib/system/libcopyfile.dylib 0x7fff92a38000 - 0x7fff92b04fef libsystem_c.dylib (825.24.0 - compatibility 1.0.0) <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib 0x7fff93dc1000 - 0x7fff93e2afff libstdc++.6.dylib (56.0.0 - compatibility 7.0.0) <EAA2B53E-EADE-39CF-A0EF-FB9D4940672A> /usr/lib/libstdc++.6.dylib 0x7fff93e2b000 - 0x7fff93e77ff7 libauto.dylib (??? - ???) <73CDC482-16E3-3FC7-9BB4-FBA2DA44DBC2> /usr/lib/libauto.dylib 0x7fff940b3000 - 0x7fff94102ff7 libcorecrypto.dylib (??? - ???) <57BC99C6-3C3F-344C-BDD6-25E845D956F2> /usr/lib/system/libcorecrypto.dylib 0x7fff954a5000 - 0x7fff954a8ff7 libdyld.dylib (210.2.3 - compatibility 1.0.0) <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib 0x7fff95ae4000 - 0x7fff95ae5ff7 libsystem_sandbox.dylib (??? - ???) <3C3B03CF-C525-3CB3-8557-62E91B93AC95> /usr/lib/system/libsystem_sandbox.dylib 0x7fff95ccd000 - 0x7fff95cdfff7 libz.1.dylib (1.2.5 - compatibility 1.0.0) <2A1551E8-A272-3DE5-B692-955974FE1416> /usr/lib/libz.1.dylib 0x7fff9619c000 - 0x7fff9619eff7 libunc.dylib (25.0.0 - compatibility 1.0.0) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib 0x7fff96427000 - 0x7fff9644bff7 libc++abi.dylib (24.2.0 - compatibility 1.0.0) <340E7C7B-DC93-3AA2-B015-B1C9541EC255> /usr/lib/libc++abi.dylib 0x7fff96550000 - 0x7fff96558ff7 libsystem_dnssd.dylib (??? - ???) <B9F7B01D-8FAF-3CA5-909E-4D52B8D2DD8A> /usr/lib/system/libsystem_dnssd.dylib 0x7fff96611000 - 0x7fff96617fff libmacho.dylib (829.0.0 - compatibility 1.0.0) <BF332AD9-E89F-387E-92A4-6E1AB74BD4D9> /usr/lib/system/libmacho.dylib 0x7fff96670000 - 0x7fff96672fff libquarantine.dylib (52.0.0 - compatibility 1.0.0) <4BE2E642-A14F-340A-B482-5BD2AEFD9C24> /usr/lib/system/libquarantine.dylib 0x7fff96b1a000 - 0x7fff96b2fff7 libdispatch.dylib (228.18.0 - compatibility 1.0.0) <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib 0x7fff96e13000 - 0x7fff96e2eff7 libsystem_kernel.dylib (2050.9.2 - compatibility 1.0.0) <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib 0x7fff96f19000 - 0x7fff96f19fff libkeymgr.dylib (25.0.0 - compatibility 1.0.0) <CC9E3394-BE16-397F-926B-E579B60EE429> /usr/lib/system/libkeymgr.dylib 0x7fff97cbf000 - 0x7fff97ce1ff7 libxpc.dylib (140.37.0 - compatibility 1.0.0) <C552985C-2171-3136-A1B9-3AB21CBF7C4A> /usr/lib/system/libxpc.dylib 0x7fff97ce6000 - 0x7fff97d1cfff libsystem_info.dylib (??? - ???) <4FFCA242-7F04-365F-87A6-D4EFB89503C1> /usr/lib/system/libsystem_info.dylib 0x7fff99289000 - 0x7fff9928aff7 libSystem.B.dylib (169.3.0 - compatibility 1.0.0) <365477AB-D641-389D-B8F4-A1FAE9657EEE> /usr/lib/libSystem.B.dylib 0x7fff99426000 - 0x7fff99445ff7 libresolv.9.dylib (??? - ???) <0882DC2D-A892-31FF-AD8C-0BB518C48B23> /usr/lib/libresolv.9.dylib 0x7fff995d1000 - 0x7fff995dcfff libsystem_notify.dylib (98.5.0 - compatibility 1.0.0) <C49275CC-835A-3207-AFBA-8C01374927B6> /usr/lib/system/libsystem_notify.dylib 0x7fff995e1000 - 0x7fff995e2fff libsystem_blocks.dylib (59.0.0 - compatibility 1.0.0) <D92DCBC3-541C-37BD-AADE-ACC75A0C59C8> /usr/lib/system/libsystem_blocks.dylib 0x7fff995e3000 - 0x7fff995ebfff liblaunch.dylib (442.21.0 - compatibility 1.0.0) <224CB010-6CF8-3FC2-885C-6F80330321EB> /usr/lib/system/liblaunch.dylib 0x7fff99757000 - 0x7fff99758ff7 libdnsinfo.dylib (453.16.0 - compatibility 1.0.0) <38A3E0F4-E34C-3D45-A2C9-4CDE2DF007BD> /usr/lib/system/libdnsinfo.dylib 0x7fff99ab0000 - 0x7fff99ab5fff libcache.dylib (57.0.0 - compatibility 1.0.0) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib 0x7fff9aa15000 - 0x7fff9aa1afff libcompiler_rt.dylib (30.0.0 - compatibility 1.0.0) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib 0x7fff9aa53000 - 0x7fff9ab6ba27 libobjc.A.dylib (228.0.0 - compatibility 1.0.0) <9FA80CDA-97F4-3801-8879-0C1B976BC5CA> /usr/lib/libobjc.A.dylib 0x7fff9ab7a000 - 0x7fff9abe2ff7 libc++.1.dylib (65.1.0 - compatibility 1.0.0) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib 0x7fff9abfb000 - 0x7fff9abfcfff libDiagnosticMessagesClient.dylib (??? - ???) <56A70657-E8C2-3804-AB87-77DC100512A4> /usr/lib/libDiagnosticMessagesClient.dylib
还有些信息不能复制,直接抓图了
感激不尽.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
服务器一般都用linux了