摘要: 1 操作系统优化 vi /etc/sysctl.conf 防止一个套接字在有过多试图连接到达时引起过载 sysctl -w net.ipv4.tcp_syncookies=1 默认128,连接队列 (解释:最大连接数是1w,但是超过了怎么办,那就放到队列里) sysctl-w net.core.so 阅读全文
posted @ 2021-07-10 22:00 weidalin 阅读(39) 评论(0) 推荐(0)
摘要: 1 安装 https://github.com/lebinh/ngxtop pip install ngxtop 2 使用 指定配置文件 ngxtop -c ./conf/nginx.conf 查询状态是200 ngxtop -c ./conf/nginx.conf --filter 'status 阅读全文
posted @ 2021-07-10 21:59 weidalin 阅读(64) 评论(0) 推荐(0)
摘要: 1 开启缓存,二级目录 # 开启缓存,二级目录 proxy_cache_path /usr/local/nginx/proxy_cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=20g; proxy_ignore_heade 阅读全文
posted @ 2021-07-10 21:58 weidalin 阅读(55) 评论(0) 推荐(0)
摘要: 文档:http://nginx.org/en/docs/ ngin_status: 并发统计 Ngxtop : 请求统计 1 并发优化 sudo vim /usr/local/nginx/conf/nginx.conf user gigabyte; #用户 worker_processes 4; # 阅读全文
posted @ 2021-07-10 21:56 weidalin 阅读(225) 评论(0) 推荐(0)
摘要: 1.内存优化catalina vi ./bin/catalina.sh Xms 最小内存,Xmx 最大内存 JAVA_OPTS="-server -Xms2048M -Xmx2048M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseCMSCompa 阅读全文
posted @ 2021-07-10 21:54 weidalin 阅读(103) 评论(0) 推荐(0)
摘要: 1 MiaoshaController implements InitializingBean / 系统初始化时获取商品库存 @throws Exception /@Overridepublic void afterPropertiesSet() throws Exception { List&lt 阅读全文
posted @ 2021-07-10 21:52 weidalin 阅读(77) 评论(0) 推荐(0)
摘要: 1 安装rabitmq 1 安装 https://my.oschina.net/u/2364788/blog/2875902 sudo apt install xmlto -y sudo apt install python-simplejson -y sudo apt-get install cu 阅读全文
posted @ 2021-07-10 21:49 weidalin 阅读(106) 评论(0) 推荐(0)
摘要: 1 更新 先把数据存到数据库中,成功后,再让缓存失效 2当设置了redis缓存获取页面html之后,编辑了页面静态化代码, 而前端页面依然显示的是之前非页面静态化的请求 解决: 去服务器删除缓存 成功 解决: 还有一个坑就是,浏览器有缓存,你修改的代码一直上传不上去,这时可以通过清理浏览器的缓存解决 阅读全文
posted @ 2021-07-10 21:47 weidalin 阅读(55) 评论(0) 推荐(0)
摘要: 1 页面缓存 1 添加自定义Key类 public class GoodsKey extends BasePrefix { private GoodsKey(int expireSecondes, String prefix) { super(expireSecondes, prefix); } p 阅读全文
posted @ 2021-07-10 21:45 weidalin 阅读(105) 评论(0) 推荐(0)
摘要: 一、war 包 1 pom.xml 依赖 dependecies 里添加spring-boot-starter-tomcat 的provided依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring 阅读全文
posted @ 2021-07-10 21:43 weidalin 阅读(61) 评论(0) 推荐(0)