- 积分
- 2
- 威望
-
- 金钱
-
- 注册时间
- 2017-3-14
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
发表于 2017-3-14 10:45:55
|
显示全部楼层
同时在线如达到几百个人,一会网站就挂掉,显示no such file or directory
军哥,你的忠实粉丝,默默支持了你好几年~~, 这几天网站只要达到同时几百人在线,就挂掉,出现no such file or directory,应该是mysql死掉了,差看mysql, 得到如下mysql垂死挣扎的过程:
170313 21:40:11 [Note] Event Scheduler: Loaded 0 events
170313 21:40:11 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170313 23:24:56 mysqld_safe Number of processes running now: 0
170313 23:24:56 mysqld_safe mysqld restarted
170313 23:24:56 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 18163 ...
170313 23:24:56 [Note] Plugin 'FEDERATED' is disabled.
170313 23:24:56 InnoDB: The InnoDB memory heap is disabled
170313 23:24:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170313 23:24:56 InnoDB: Compressed tables use zlib 1.2.3
170313 23:24:56 InnoDB: Initializing buffer pool, size = 128.0M
170313 23:24:56 InnoDB: Completed initialization of buffer pool
170313 23:24:56 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1589182633
170313 23:24:56 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1589183080
170313 23:24:56 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 5299928, file name ./mysql-bin.000018
170313 23:24:57 InnoDB: Waiting for the background threads to start
170313 23:24:58 InnoDB: 5.5.48 started; log sequence number 1589183080
170313 23:24:58 [Note] Recovering after a crash using mysql-bin
170313 23:24:58 [Note] Starting crash recovery...
170313 23:24:58 [Note] Crash recovery finished.
170313 23:24:58 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170313 23:24:58 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170313 23:24:58 [Note] Server socket created on IP: '0.0.0.0'.
170313 23:24:58 [Note] Event Scheduler: Loaded 0 events
170313 23:24:58 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170313 23:56:21 mysqld_safe Number of processes running now: 0
170313 23:56:21 mysqld_safe mysqld restarted
170313 23:56:21 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 18532 ...
170313 23:56:21 [Note] Plugin 'FEDERATED' is disabled.
170313 23:56:21 InnoDB: The InnoDB memory heap is disabled
170313 23:56:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170313 23:56:21 InnoDB: Compressed tables use zlib 1.2.3
170313 23:56:21 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
170313 23:56:21 InnoDB: Completed initialization of buffer pool
170313 23:56:21 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170313 23:56:21 [ERROR] Plugin 'InnoDB' init function returned error.
170313 23:56:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170313 23:56:21 [ERROR] Unknown/unsupported storage engine: InnoDB
170313 23:56:21 [ERROR] Aborting
170313 23:56:21 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
170313 23:56:21 mysqld_safe mysqld from pid file /usr/local/mysql/var/li1206-174.pid ended
用的是 Linode 4096系列主机,想问一下是主机不行还是需要更改mysql的什么配置文件? 如下是php-fpm 设置
[www]
listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 50
pm.start_servers = 30
pm.min_spare_servers = 20
pm.max_spare_servers = 50
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
恳请军哥看到了回复下... |
|