摘要: 背景 处于内网存在网络限制,无法在本地使用华为云sdk(sdk有endpoint);但本地可以访问某华为云虚拟机A,A处于华为云内网可以访问,因此计划通过在A上做代理,通过A转发请求以实现。 Note&踩坑 1. endpoint必须使用华为云域名,不能使用代理地址; # 需写明project_id 阅读全文
posted @ 2026-10-26 10:40 liubilan 阅读(4) 评论(0) 推荐(0)
摘要: 背景:近期有个java程序,起了12个实例,每个pod内存占用都在6G以上很高; k8s exec 进入Pod查看内存分布: root@stack-charge-server-0-0:/app# jcmd 1 VM.native_memory summary scale=MB 1: Native M 阅读全文
posted @ 2026-10-14 15:09 liubilan 阅读(3) 评论(0) 推荐(0)
摘要: docker镜像瘦身 基础镜像优选alpine代替centos\ubuntu; 多阶段构建,去除编译过程产物,只保留最终构建结果; 很适合go,因为Go 编译后生成单个静态可执行文件,不依赖系统库; 其他语言各有不同,核心为“编译环境和运行环境分离”。 容器缺乏调试工具,服务器通过nsenter进入 阅读全文
posted @ 2026-08-13 10:02 liubilan 阅读(9) 评论(0) 推荐(0)
摘要: 背景: mysql新建数据表没有添加唯一索引,程序发版后,产生了很多脏数据,且在持续产生中,不能中断程序; 解决方案: 1. 创建临时表 -- 第1步:创建辅助表 CREATE TABLE charging_power_status_backup LIKE charging_power_status 阅读全文
posted @ 2026-07-14 18:10 liubilan 阅读(12) 评论(0) 推荐(0)
摘要: 前置: 测试版本为emqx 开源版5.8.6; 优化: 1. 调整服务器文件描述符, ulimit -SHn 300000 sed -i s/65535/300000/g /etc/security/limits.conf ulimit -n 2. 调整emqx服务端配置 node { max_po 阅读全文
posted @ 2026-06-10 14:49 liubilan 阅读(59) 评论(0) 推荐(0)
摘要: 问题: 业务反馈更新数据表时报错:Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try resta 阅读全文
posted @ 2026-06-03 15:01 liubilan 阅读(53) 评论(0) 推荐(0)
摘要: 1. 离线docker镜像包、扩展包等 https://lixian.online/vscode https://www.repoflow.io/tools/docker-save 2. 综合类 linux学习路线 https://labex.io/zh/linuxjourney 别人的运维文档 h 阅读全文
posted @ 2026-05-13 11:37 liubilan 阅读(93) 评论(0) 推荐(0)
摘要: 问题背景: 一个select语句中,where条件语句为 where isdeleted=0 and order_id is not null; 这个select语句执行了11s。 表中已有索引: 索引1:(order_id) 索引2:(order_id, starttime, isdeleted) 阅读全文
posted @ 2026-05-12 09:04 liubilan 阅读(35) 评论(0) 推荐(0)
摘要: 1. 查看Linux下已安装的gcc版本: ls /usr/bin/gcc* 2. 切换gcc版本: sudo update-alternatives --config gcc 3. 若没有想要的候选项,可手动添加(一般无需): sudo update-alternatives --install 阅读全文
posted @ 2022-08-26 11:30 liubilan 阅读(1286) 评论(0) 推荐(0)
摘要: 转载博客:https://www.jb51.net/article/128067.htm 为防丢失,做个记录; /etc/resolv.conf文件不能手动修改,会被重写覆盖; 梳理一遍Ubuntu下对resolv.conf的编辑规则,就可以总结出来怎么对症下药去处理静态dns的配置重启失效的问题了 阅读全文
posted @ 2022-08-22 14:02 liubilan 阅读(552) 评论(0) 推荐(0)