当前位置:网站首页>Troubleshooting: MySQL containers in alicloud lightweight application servers stop automatically
Troubleshooting: MySQL containers in alicloud lightweight application servers stop automatically
2022-06-09 04:43:00 【Migrant worker Lao Wang】
Blog home page :https://tomcat.blog.csdn.net
Blogger's nickname : Lao Wang of migrant workers
Main areas :Java、Linux、K8S
We look forward to your attention, praise and collection comments
Details of the problem
Recently, I helped a graduate teacher to deploy a set of on alicloud lightweight application servers app Back end , Contains a MySQL Service instances and a set of Java Code .MySQL The deployment of is to use yum install docker Environmental Science , Then run one of them MySQL Containers .Java The deployment of is to use yum install jdk Environmental Science , And then run java -jar ${jar file } that will do . I deploy and run first MySQL service , Run again Jar file .
The operation of the whole deployment is not complicated , There should be no problem . But run start Jar When you file , The database connection error is always reported , As shown in the figure below :
Face the problem , First of all, I was in the local IDEA Medium test start , But no error was reported .
Then I found that every time Java Run at startup jar In the process of packaging ,MySQL The container will stop . Even after the container hangs up , I will restart it manually right away ,MySQL The container will also stop again in twoorthree minutes .
This is depressing , function Jar package , How could it lead to MySQL Hang up ?
Question why
Finally, I realized that the alicloud lightweight application server may be configured too low , The server that the teacher chooses is the cheapest ,1 nucleus CPU,1G Memory . Start up Jar When you file ,MySQL The container stopped because of insufficient memory .
solve the problem
Find the cause , Then the problem will be solved .
There are two solutions :
- Upgrade server configuration . This is the simplest and most direct way .
- Deploy in a way that consumes less resources .
In this deployment , I took the second approach , No more use and startup docker, Instead, the traditional method , A set of... Is deployed directly on the server MySQL service . Then the problem was solved .
If you want to reprint , Please indicate the source of this article : Migrant worker Lao Wang's CSDN Blog https://blog.csdn.net/monarch91 .
边栏推荐
- How to set up FAQ documents? Just four steps
- 2022 test question bank and simulation test of special operation certificate for installation, maintenance and demolition at heights
- Openinfra Foundation launched the "targeted fund" program to promote successful open source governance experience
- Detailed explanation of MySQL field types
- View local public IP
- TypeScript学习【6】 接口类型
- 在渗透测试中快速检测常见中间件、组件的高危漏洞
- Applets have become a must for super apps, competing for private domain "reserve"
- How to understand CTF information security competition
- Iscc-2022-reverse-mobile- part WP
猜你喜欢

2022 safety officer-b certificate work certificate title and online simulation examination

(6) Events

2022安全员-C证考试练习题模拟考试平台操作

2022年安全员-A证考试试题及在线模拟考试

Just now, we received a letter of thanks from the Beijing Organizing Committee for the Winter Olympics

StepN分析

API 网关 Apache APISIX 在 AWS Graviton3 上的安装与性能测试

openGL_ 02 point line surface triangle

Openstack Learning Series 12: installing CEPH and docking openstack

Give an example to illustrate the cell and num of lstmcell in TF_ What does unit mean
随机推荐
渗透测试路径字典、爆破字典
openGL_ 02 point line surface triangle
Devin round smart screen comes into the market
2022 safety officer-a certificate examination questions and online simulation examination
How to understand CTF information security competition
openGL_ 04 drawing with index array
(4)数据响应式
Record the problems encountered in importing the DMP file into Oracle database (on the local wire) and the solutions
[SWPU2019]ReverseMe
Keepalived configure virtual IP
Smart curly bracket escape
Internet behavior networking
Detailed explanation of MySQL field types
2022 safety officer-c certificate examination practice questions simulated examination platform operation
zsh
TypeScript 的内置对象
Golang ---- storage of variables and their contents
Proteus simulation Arduino
2022 R2 mobile pressure vessel filling test simulation 100 questions and simulation test
JVM面试
