apache 服务器有时会挂起

eit6fx6z  于 2022-11-30  发布在  Apache
关注(0)|答案(1)|浏览(79)

bounty将在3天后过期。回答此问题可获得+50声望奖励。Ahmad Asjad正在寻找标准答案:想知道它为什么会被吊死

我在同一台服务器上运行了一个PHP应用程序,其中包含Apache2.4和MySQL。当系统重新启动时,它可以正常工作一段时间,可以轻松处理所有的请求/响应,没有任何问题。但突然它在某个地方卡住了。下面是一些日志详细信息
顶部
x1c 0d1x看起来MySQL使用的内存比预期的要多,但是当我运行mysqltuner命令时,它看起来很好。
./mysqltuner.pl

>>  MySQLTuner 2.0.9
 * Jean-Marie Renouard <jmrenouard@gmail.com>
 * Major Hayden <major@mhtx.net>
>>  Bug reports, feature requests, and downloads at http://mysqltuner.pl/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password: [OK] Currently running supported MySQL version 8.0.31-0ubuntu0.22.04.1
[OK] Operating on 64-bit architecture
 
-------- Log file Recommendations ------------------------------------------------------------------
[!!] log_error is set to stderr, but this script can't read stderr
 
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA 
[--] Data in InnoDB tables: 13.1M (Tables: 65)
[--] Data in MyISAM tables: 20.4K (Tables: 6)
[OK] Total fragmented tables: 0
 
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
 
-------- Views Metrics -----------------------------------------------------------------------------
 
-------- Triggers Metrics --------------------------------------------------------------------------
 
-------- Routines Metrics --------------------------------------------------------------------------
 
-------- Security Recommendations ------------------------------------------------------------------
[--] Skipped due to unsupported feature for MySQL 8
 
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
 
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 1h 33m 1s (2K q [0.467 qps], 55 conn, TX: 16M, RX: 642K)
[--] Reads / Writes: 90% / 10%
[--] Binary logging is enabled (GTID MODE: OFF)
[--] Physical Memory     : 964.1M
[--] Max MySQL memory    : 415.7M
[--] Other process memory: 0B
[--] Total buffers: 88.0M global + 9.9M per thread (10 max threads)
[--] Performance_schema Max memory usage: 228M
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 336.7M (34.92% of installed RAM)
[OK] Maximum possible memory usage: 415.7M (43.11% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/2K)
[OK] Highest usage of available connections: 20% (2/10)
[!!] Aborted connections: 9.09% (5/55)
[!!] Name resolution is active: a reverse name resolution is made for each new connection which can reduce performance
[--] Query cache has been removed since MySQL 8.0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 374 sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 0% (0 on disk / 161 total)
[OK] Thread cache hit rate: 96% (2 created / 55 connections)
[OK] Table cache hit rate: 93% (9K hits / 9K requests)
[OK] table_definition_cache (2000) is greater than number of tables (398)
[OK] Open file limit used: 0% (2/10K)
[OK] Table locks acquired immediately: 100% (10 immediate / 10 locks)
[OK] Binlog cache memory access: 100.00% (191 Memory / 191 Total)
 
-------- Performance schema ------------------------------------------------------------------------
[--] Performance_schema is activated.
[--] Memory used by Performance_schema: 228.9M
[--] Sys schema is installed.
 
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
 
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] MyISAM Metrics are disabled since MySQL 8.0.
 
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 64.0M / 13.1M
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 8.0M * 2/64.0M should be equal to 25%
[OK] InnoDB buffer pool instances: 1
[--] Number of InnoDB Buffer Pool Chunk: 1 for 1 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.11% (144492 hits / 145796 total)
[!!] InnoDB Write Log efficiency: 69.68% (1721 hits / 2470 total)
[OK] InnoDB log waits: 0.00% (0 waits / 749 writes)
 
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine not available.
 
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
 
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
 
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
 
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server
 
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    MySQL was started within the last 24 hours: recommendations may be inaccurate
    Reduce or eliminate unclosed connections and network issues
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
Variables to adjust:
    skip-name-resolve=1

apache的strace日志
ps辅助|grepApache|awk '{打印”-p“$2}'|萨格斯苏多斯特雷塞
全输出:

[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=52 /* 0.52 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718263258
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=52 /* 0.52 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718264142
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=52 /* 0.52 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718265958
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718266637
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718268179
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718269300
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718271166
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1491] <... futex resumed>)        = 0
[pid  1491] epoll_wait(18,  <unfinished ...>
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid  1491] <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2403259792, u64=139966797501840}}], 2, 10000) = 1
[pid   955] times( <unfinished ...>
[pid  1491] accept4(6,  <unfinished ...>
[pid   955] <... times resumed>{tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718273373
[pid  1491] <... accept4 resumed>{sa_family=AF_INET6, sin6_port=htons(47296), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:122.164.182.5", &sin6_addr), sin6_scope_id=0}, [128 => 28], SOCK_CLOEXEC) = 19
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1491] futex(0x7f4c8f893000, FUTEX_UNLOCK_PI <unfinished ...>
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1491] <... futex resumed>)        = 0
[pid   955] wait4(-1,  <unfinished ...>
[pid  1491] getsockname(19,  <unfinished ...>
[pid   955] <... wait4 resumed>0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid  1491] <... getsockname resumed>{sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.0.0.27", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
[pid  1487] <... futex resumed>)        = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718276832
[pid  1491] getrandom( <unfinished ...>
[pid  1487] epoll_wait(18,  <unfinished ...>
[pid  1491] <... getrandom resumed>"\xf4\x2b\x54\x44\x40\x25\x47\x3e\xc7\x84\x14\xac\x75\xc2\x92\x4b\x28\x96\x0e\x35\xee\xe7\x92\xfc\x25\x10\x20\xc1\x46\xb8\xce\x01", 32, 0) = 32
[pid  1487] <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2403259792, u64=139966797501840}}, {events=EPOLLIN, data={u32=2403259824, u64=139966797501872}}], 2, 10000) = 2
[pid  1491] getrandom( <unfinished ...>
[pid  1487] accept4(4,  <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1491] <... getrandom resumed>"\x28\x05\x2c\xb6\x2c\xf2\x4e\x39\x74\x7c\xe5\x2b\x32\xcd\x36\x44\x72\xab\x7d\xdc\x92\x96\xf4\x7f\x8a\x3f\x33\x27\x5a\x59\xd4\xcf", 32, 0) = 32
[pid  1487] <... accept4 resumed>{sa_family=AF_INET6, sin6_port=htons(21738), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:192.155.90.118", &sin6_addr), sin6_scope_id=0}, [128 => 28], SOCK_CLOEXEC) = 19
[pid  1491] openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  1487] futex(0x7f4c8f893000, FUTEX_UNLOCK_PI <unfinished ...>
[pid  1491] <... openat resumed>)       = 20
[pid  1487] <... futex resumed>)        = 0
[pid  1763] <... futex resumed>)        = 0
[pid  1763] epoll_wait(18, [{events=EPOLLIN, data={u32=2403259792, u64=139966797501840}}], 2, 10000) = 1
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1487] getsockname(19,  <unfinished ...>
[pid  1763] accept4(6,  <unfinished ...>
[pid  1491] read(20,  <unfinished ...>
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD <unfinished ...>
[pid  1487] <... getsockname resumed>{sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.0.0.27", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
[pid  1763] <... accept4 resumed>{sa_family=AF_INET6, sin6_port=htons(60522), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:122.164.182.5", &sin6_addr), sin6_scope_id=0}, [128 => 28], SOCK_CLOEXEC) = 19
[pid  1763] futex(0x7f4c8f893000, FUTEX_UNLOCK_PI <unfinished ...>
[pid  1491] <... read resumed>"\244>5\273\2\331Kz\371\357\232\317fwL'\204\206\213\260\260\3226ui\300\205\332\r\346\237\216"..., 512) = 512
[pid  1491] getrandom("\x7c\x45\xf9\xbe\x87\xdf\x4f\xc0\x05\x0e\x85\xc6\xa2\x71\x80\x09\x8b\x4e\x2f\xc5\x78\x5e\x5f\xf3\x60\x39\x4f\x6a\x54\x6b\x94\x0b", 32, 0) = 32
[pid  1491] close(20)                   = 0
[pid  1763] <... futex resumed>)        = 0
[pid  1490] <... futex resumed>)        = 0
[pid  1490] epoll_wait(18,  <unfinished ...>
[pid  1763] getsockname(19, {sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.0.0.27", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
[pid   955] <... clone resumed>, child_tidptr=0x7f4c8f4d2a50) = 2425
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=53 /* 0.53 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718278772
[pid  1763] getrandom( <unfinished ...>
[pid  1491] fcntl(19, F_GETFL <unfinished ...>
[pid  1487] fcntl(19, F_GETFL <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1491] <... fcntl resumed>)        = 0x2 (flags O_RDWR)
[pid  1763] <... getrandom resumed>"\x86\x01\x3b\xdb\x7d\x70\xcd\xe9\xf4\x43\xdd\x8d\x14\x0a\x00\xfc\x1b\xc8\xad\xf0\xa1\x27\x8e\x47\x42\x8f\xd8\x47\xf1\x88\x04\xa0", 32, 0) = 32
[pid  1487] <... fcntl resumed>)        = 0x2 (flags O_RDWR)
[pid  1491] fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK <unfinished ...>
[pid  1487] fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK <unfinished ...>
[pid  1763] getrandom( <unfinished ...>
[pid  1490] <... epoll_wait resumed>[], 2, 10000) = 0
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1491] <... fcntl resumed>)        = 0
[pid  1487] <... fcntl resumed>)        = 0
[pid  1763] <... getrandom resumed>"\x81\x05\xbd\xf6\x18\x2c\xbd\x7a\x3d\xda\x1c\x25\x6b\x3c\x02\xdc\xe2\xbd\xf1\x4f\xc8\x85\x28\xce\xf6\x8c\x81\xff\x8a\x5c\x39\x1c", 32, 0) = 32
[pid  1763] openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  1490] epoll_wait(18,  <unfinished ...>
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD <unfinished ...>
[pid  1763] <... openat resumed>)       = 20
[pid  1490] <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2403259792, u64=139966797501840}}], 2, 10000) = 1
[pid   955] <... clone resumed>, child_tidptr=0x7f4c8f4d2a50) = 2426
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4c8f4d2a50) = 2427
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=54 /* 0.54 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718280136
[pid  1763] read(20,  <unfinished ...>
[pid  1490] accept4(6,  <unfinished ...>
[pid  1487] read(19,  <unfinished ...>
[pid  1763] <... read resumed>"f\246\312\v\264\234\301\204O6\251Z\314\26\367\341#\rG\31'>g_3!A2\310\271TZ"..., 512) = 512
[pid  1491] read(19,  <unfinished ...>
[pid  1490] <... accept4 resumed>{sa_family=AF_INET6, sin6_port=htons(37126), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:192.0.102.40", &sin6_addr), sin6_scope_id=0}, [128 => 28], SOCK_CLOEXEC) = 19
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1763] getrandom( <unfinished ...>
[pid  1491] <... read resumed>"\26\3\1\2\0\1\0\1\374\3\3\16\266\201\25\237\330\4\205h\f\366\27\244\210)R\2438\350p\2"..., 8000) = 517
[pid  1490] futex(0x7f4c8f893000, FUTEX_UNLOCK_PI <unfinished ...>
[pid  1487] <... read resumed>"\26\3\1\0\205\1\0\0\201\3\3\0\206\204\337\362N\241\343\265\30Rj\366\r\221O\343]_\330\277"..., 8000) = 138
[pid  1763] <... getrandom resumed>"\xa3\xc1\xb1\xc3\x87\xbc\xd2\x75\xbb\xe3\x75\x0a\xd2\x7d\x48\x51\x08\xb4\x56\x43\xb3\x25\xa3\x18\xaf\x71\xb4\xd5\xa2\xc3\xaa\x8b", 32, 0) = 32
[pid  1490] <... futex resumed>)        = 0
[pid  1763] close(20 <unfinished ...>
[pid  1490] getsockname(19,  <unfinished ...>
[pid  1763] <... close resumed>)        = 0
[pid  1490] <... getsockname resumed>{sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.0.0.27", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=54 /* 0.54 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718285330
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD <unfinished ...>
[pid  1490] getrandom( <unfinished ...>
[pid   955] <... clone resumed>, child_tidptr=0x7f4c8f4d2a50) = 2429
[pid  1490] <... getrandom resumed>"\x2d\x84\x03\x1f\xc6\xd2\x1b\x4e\x0e\x12\x30\xd1\x30\xf7\xff\xa8\x72\x8a\x07\x46\x36\xd4\xce\x62\xfe\x58\x45\x36\xd1\xa7\xf8\x6b", 32, 0) = 32
[pid  1490] getrandom("\xd2\xc0\x7f\x2a\x6c\xf7\x41\x47\x99\xe6\xde\x25\x35\x2c\x0c\xaf\xf6\x40\x49\x5d\x31\xc5\xdb\xda\xe3\x95\x9c\x5e\x8d\x1a\x6a\xc1", 32, 0) = 32
[pid   955] wait4(-1,  <unfinished ...>
[pid  1490] openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  1763] fcntl(19, F_GETFL <unfinished ...>
[pid   955] <... wait4 resumed>0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid  1490] <... openat resumed>)       = 20
[pid  1763] <... fcntl resumed>)        = 0x2 (flags O_RDWR)
[pid   955] times( <unfinished ...>
[pid  1763] fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK <unfinished ...>
[pid  1490] read(20,  <unfinished ...>
[pid  1763] <... fcntl resumed>)        = 0
[pid   955] <... times resumed>{tms_utime=19 /* 0.19 s */, tms_stime=54 /* 0.54 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718287566
[pid  1490] <... read resumed>"\251FO\252\273v\177Fy|\36w\363+[W\224;v\314\303-\246\3111-\275/\377\21\5\366"..., 512) = 512
[pid  1491] getpid( <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1763] read(19,  <unfinished ...>
[pid  1491] <... getpid resumed>)       = 1491
[pid  1490] getrandom( <unfinished ...>
[pid  1763] <... read resumed>"\26\3\1\2\0\1\0\1\374\3\3\275\4\232\26s\344E\340\226\241\36\214&\242S\325\2623\257\363Z"..., 8000) = 517
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1491] getpid( <unfinished ...>
[pid  1490] <... getrandom resumed>"\x68\xf1\xe1\xcb\x01\x79\x0b\x9e\x1b\xf5\x81\x57\xb5\x89\xcd\x3e\x9c\x2d\xa0\x90\x3f\x1d\xf8\xc8\xc0\x2c\xee\x5e\xa5\x5b\x5e\x81", 32, 0) = 32
[pid  1491] <... getpid resumed>)       = 1491
[pid  1490] close(20)                   = 0
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4c8f4d2a50) = 2430
[pid   955] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD <unfinished ...>
[pid  1491] getpid( <unfinished ...>
[pid   955] <... clone resumed>, child_tidptr=0x7f4c8f4d2a50) = 2431
[pid  1491] <... getpid resumed>)       = 1491
[pid  1491] getpid()                    = 1491
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=55 /* 0.55 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718294976
[pid  1490] fcntl(19, F_GETFL)          = 0x2 (flags O_RDWR)
[pid  1490] fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1490] <... fcntl resumed>)        = 0
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=55 /* 0.55 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718297256
[pid  1487] writev(19, [{iov_base="HTTP/1.1 400 Bad Request\r\nDate: "..., iov_len=182}, {iov_base="<!DOCTYPE HTML PUBLIC \"-//IETF//"..., iov_len=301}], 2 <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1487] <... writev resumed>)       = 483
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times( <unfinished ...>
[pid  1763] getpid( <unfinished ...>
[pid   955] <... times resumed>{tms_utime=19 /* 0.19 s */, tms_stime=55 /* 0.55 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718299906
[pid  1763] <... getpid resumed>)       = 1763
[pid  1491] writev(19, [{iov_base="\26\3\3\0z\2\0\0v\3\3z\3328q\270\257C\216\215\274\r\272\207T\252m\366\276>\231\225"..., iov_len=4096}], 1 <unfinished ...>
[pid  1490] read(19,  <unfinished ...>
[pid  1487] write(16, "192.155.90.118 - - [15/Nov/2022:"..., 79 <unfinished ...>
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1763] getpid( <unfinished ...>
[pid  1490] <... read resumed>"\26\3\1\1;\1\0\0017\3\3\vtK+\335>\354=\317,\0\311{?{\354\31F\17d!"..., 8000) = 320
[pid  1491] <... writev resumed>)       = 4096
[pid  1763] <... getpid resumed>)       = 1763
[pid  1487] <... write resumed>)        = 79
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1491] getpid( <unfinished ...>
[pid  1763] getpid()                    = 1763
[pid  1763] getpid( <unfinished ...>
[pid  1491] <... getpid resumed>)       = 1491
[pid  1763] <... getpid resumed>)       = 1763
[pid  1487] times( <unfinished ...>
[pid  1763] writev(19, [{iov_base="\26\3\3\0z\2\0\0v\3\3\330\352\265\276\271\264\2\333S\33\2\226\20\230M\0\23\241\201&\354"..., iov_len=4096}], 1 <unfinished ...>
[pid   955] wait4(-1,  <unfinished ...>
[pid  1763] <... writev resumed>)       = 4096
[pid  1491] writev(19, [{iov_base="\271\345\340\200a\352\231Q\323\201\274\2212\342F\350\322\315\22<\364\v'\336\272\257\2004\303\275\n\274"..., iov_len=486}], 1 <unfinished ...>
[pid  1490] getpid( <unfinished ...>
[pid  1487] <... times resumed>{tms_utime=329 /* 3.29 s */, tms_stime=240 /* 2.40 s */, tms_cutime=0, tms_cstime=0}) = 1718309667
[pid   955] <... wait4 resumed>0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid  1491] <... writev resumed>)       = 486
[pid  1490] <... getpid resumed>)       = 1490
[pid  1490] getpid()                    = 1490
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=55 /* 0.55 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718313368
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1763] getpid( <unfinished ...>
[pid  1491] read(19,  <unfinished ...>
[pid  1490] getpid( <unfinished ...>
[pid  1487] shutdown(19, SHUT_WR <unfinished ...>
[pid  1763] <... getpid resumed>)       = 1763
[pid  1491] <... read resumed>"", 8000) = 0
[pid  1490] <... getpid resumed>)       = 1490
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1487] <... shutdown resumed>)     = -1 ENOTCONN (Transport endpoint is not connected)
[pid  1490] getpid()                    = 1490
[pid  1487] close(19)                   = 0
[pid   955] wait4(-1, 0x7ffd964d6c24, WNOHANG|WSTOPPED, NULL) = 0
[pid   955] times({tms_utime=19 /* 0.19 s */, tms_stime=55 /* 0.55 s */, tms_cutime=1686 /* 16.86 s */, tms_cstime=389 /* 3.89 s */}) = 1718320078
[pid  1763] writev(19, [{iov_base="\230\363\3727\306\304X\\\240\260\236\366}A;Q\366\325\247\347\t&<\255s\361,\351~Q@\237"..., iov_len=486}], 1 <unfinished ...>
[pid  1487] read(7,  <unfinished ...>
[pid  1763] <... writev resumed>)       = 486
[pid  1487] <... read resumed>0x7ffd964d6b1f, 1) = -1 EAGAIN (Resource temporarily unavailable)
[pid   955] pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL <unfinished ...>
[pid  1490] writev(19, [{iov_base="\26\3\3\0z\2\0\0v\3\3\242\215\257\"\330\375N\211\204\371P4/\5[\7n\312l\330\376"..., iov_len=4096}], 1 <unfinished ...>
[pid  1487] futex(0x7f4c8f893000, FUTEX_LOCK_PI, NULL <unfinished ...>
[pid  1490] <... writev resumed>)       = 4096
[pid  1487] <... futex resumed>)        = 0
[pid  1487] epoll_wait(18,  <unfinished ...>
[pid   955] <... pselect6 resumed>)     = 0 (Timeout)
[pid  1487] <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2403259792, u64=139966797501840}}], 2, 10000) = 1

配置:Ubuntu 22.04PHP 7.4Apache 2.4MySQL 5.6
我真的很感激你能提供的任何帮助。

lxkprmvk

lxkprmvk1#

我认为htop表示没有分配“交换”。同时,RAM几乎已满。
我建议在my.cnf中将max_connections降低到10(并重新启动mysqld。这可能会对一些人有所帮助。如果不够,那么我建议以下任何一种:

  • 添加一些交换空间,或
  • 查看可以缩小的内容,或
  • 添加更多RAM。

通常情况下,我会建议降低innodb_buffer_pool_size作为一个快速修复内存不足和无交换,但它已经是危险的低,只有64M。

相关问题