问:这个服务器的mysql最近每天都要出问题,老要重启才能使用。
数据库报错日志,要怎么修复,才能不用每次手动重启?
17:43:40 [Note] /www/server/mysql/bin/mysqld: ready for connections.
Version: '5.6.50-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
00:51:33 [Note] Plugin 'FEDERATED' is disabled.
00:51:33 [Note] InnoDB: Using atomics to ref count buffer pool pages
00:51:33 [Note] InnoDB: The InnoDB memory heap is disabled
00:51:33 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
00:51:33 [Note] InnoDB: Memory barrier is not used
00:51:33 [Note] InnoDB: Compressed tables use zlib 1.2.11
00:51:33 [Note] InnoDB: Using Linux native AIO
00:51:33 [Note] InnoDB: Using CPU crc32 instructions
00:51:34 [Note] InnoDB: Initializing buffer pool, size = 128.0M
00:51:34 [Note] InnoDB: Completed initialization of buffer pool
00:51:34 [Note] InnoDB: Highest supported file format is Barracuda.
00:51:34 [Note] InnoDB: The log sequence numbers and in ibdata files do not match the log sequence number in the ib_logfiles!
00:51:34 [Note] InnoDB: Database was not shutdown normally!
00:51:34 [Note] InnoDB: Starting crash recovery.
00:51:34 [Note] InnoDB: Reading tablespace information from the .ibd files…
,这个数据库每天老出问题,要重启才可以
答:您好,
查看是服务器内存耗尽导致mysql进程终止,服务器内部署的站点较多,有几十个站点,该服务器目前内存只有2G,当前的配置无法支持这么多的站点,建议考虑升级服务器内存到4G,cpu到4核以上再观察下;非常感谢您长期对我司的支持!
问:如果只是内存小,升级到3G就可以了吧?不需要升级cpu吧?
或者有没有优化下mysql配置能凑合用,等未来收入高点或者技术好点再说?
——
现在穷得很,能少花钱凑合用最好。
答:您好,
服务器内存实在是比较小,当前服务器内站点又部署的很多,基本上没有多少优化的空间,建议升级到4G内存,升级到4G比升级到3G多不了多少钱的;非常感谢您长期对我司的支持!
问:直接在常用功能哪里升级内存后,会自动重启吗?重启就可以了吗?其他不会改动吧。
答:您好,
需要先登录服务器操作关机,可以通过ssh方式登录服务器使用halt命令操作关机;
然后操作升级服务器内存,升级完成后系统会自动开机;非常感谢您长期对我司的支持!
问:我用了halt,怎么没反应呢。要不你这边帮忙我操作下,我升级到3g内存就可以了。要是后面还是不行,在升级到4G吧。
答:您好,
已经为您完成了升级服务器内存到3G,请您查看;非常感谢您长期对我司的支持!