服务器配置:
CPU: 1核 内存: 2048 MB
2Mbps
CentOS 6.5 64位
Apache2.4
Mysql:5.6
最近网站经常出现数据库链接不上,特别是晚上,很郁闷,晚上又不知道,每次都是第二天才知道然后重启服务器,网站才能访问。
看后台又没有人攻击,也扫描木马什么的,也没有。
然后用软件看,cpu老是异常。
就测试了下,1000ip不到访问一个页面,就瞬间让整个服务器的cpu爆满,内存也站了1.3-1.5G左右。
其中数据库就占用30-50%左右。
不知道是数据库有问题还是什么?
平时正常情况下服务器cpu占用还不到5%,数据库占用cpu更少了。
就是并发一多,数据库就挂了。
我把之前的数据库错误日志删了,之前的太多了,也不数据数据库这块。
刚才我自己用代理ip访问网站,然后网站就打不开,数据库停止运行了。
下面是我刚才测试得到的数据库日志,还望各位帮忙看看。
161002 15:31:43 mysqld_safe Number of processes running now: 0
161002 15:31:43 mysqld_safe mysqld restarted
2016-10-02 15:31:44 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-10-02 15:31:45 14693 [Note] Plugin 'FEDERATED' is disabled.
2016-10-02 15:31:45 14693 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-10-02 15:31:45 14693 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-02 15:31:45 14693 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-10-02 15:31:45 14693 [Note] InnoDB: Memory barrier is not used
2016-10-02 15:31:45 14693 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-10-02 15:31:45 14693 [Note] InnoDB: Using Linux native AIO
2016-10-02 15:31:45 14693 [Note] InnoDB: Using CPU crc32 instructions
2016-10-02 15:31:45 14693 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2016-10-02 15:31:45 14693 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2016-10-02 15:31:45 14693 [ERROR] Plugin 'InnoDB' init function returned error.
2016-10-02 15:31:45 14693 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-10-02 15:31:45 14693 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-10-02 15:31:45 14693 [ERROR] Aborting
2016-10-02 15:31:45 14693 [Note] Binlog end
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'partition'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'BLACKHOLE'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_METRICS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_CMP'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'INNODB_TRX'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'ARCHIVE'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'MyISAM'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'CSV'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'MRG_MYISAM'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'MEMORY'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'sha256_password'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'mysql_old_password'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'mysql_native_password'
2016-10-02 15:31:45 14693 [Note] Shutting down plugin 'binlog'
2016-10-02 15:31:45 14693 [Note] /alidata/server/mysql/bin/mysqld: Shutdown complete
161002 15:31:45 mysqld_safe mysqld from pid file /alidata/server/mysql/data/AY140716132949Z.pid ended
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。