本帖最后由 81876823 于 2022-3-29 16:33 编辑
问题描述:
Nginx、PHP、MySQL服务经常莫名同时自动停止,服务器性能很好,访问量很小。求大佬们帮忙顺提供思路;
(我主要是做开发的,Linux服务器只会简单的配置使用,有会写shell脚本的大佬,帮我写一个 shell脚本,如果 lnmp 状态 停止,那么执行:lnmp start ;解决燃眉之急,然后再排查服务器 感谢了~!)
MySQL日志:
// 手动启动的日志(lnmp start)
2022-03-25T01:12:10.022303Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-03-25T01:12:10.022450Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.11) starting as process 139470
2022-03-25T01:12:10.916149Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-03-25T01:12:10.967420Z 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.0.11' socket: '/tmp/mysql.sock' port: 3306 Source distribution.
// 自动关闭服务日志
2022-03-25T01:37:49.029234Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.11) Source distribution.
php-fpm日志:
// 手动启动的日志(lnmp start)
[25-Mar-2022 09:12:11] NOTICE: fpm is running, pid 139526
[25-Mar-2022 09:12:11] NOTICE: ready to handle connections
// 自动关闭服务日志
[25-Mar-2022 09:37:47] NOTICE: Terminating ...
[25-Mar-2022 09:37:47] NOTICE: exiting, bye-bye!
感谢!
|