报错知识库
1.python项目部署报错pthread_create failed for thread 13 of 48: Resource temporarily unavailable
报错说明:线程数不够
1)排错过程:
ulimit -a查看docker基础镜像
其中open files为一个任务打开的最大进程数
max user processes为当前用户同时打开的最大进程数,(-u) unlimited为该限制被设置为无限大,用户可以创建任意数量的进程。
ulimit -a查看服务器
由此可以看到镜像中的进程数量是足够的,在服务器中一个任务打开的进程数为1024比较小,而该gunicorn中配置
workers 50
worker-connections 1000 最大并发为5000,所以可能会超过服务器的限制
2)处理方式:
在服务器limits文件中尾部添加如下内容
vi /etc/security/limits.conf
* - nofile 1048576
* - nproc 1048576
将一个任务打开的进程数和任何用户最大的进程数都设置为1048576,此配置打开新链接后生效,不用重启。
然后问题解决。
2.java项目启动报错rg.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'hrsMeritsTaskPushService': Bean with name 'hrsMeritsTaskPushService' has been injected into other beans [hrsValuesManageServiceImpl,hrsAnnualSummaryService] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesForType' with the 'allowEagerInit' flag turned off, for example.
循环嵌套
1)排错过程,手动打包启动没问题,使用jenkins进行打包就报错。后测试得知只有test分支打包启动才会出现这个循环嵌套问题,同样的代码使用其他分支名则不会出现该问题。具体为何不能使用test分支,这个分支名与jenkins中的哪个环境变量冲突没有排查到。
2)处理方式,使用非test分支进行部署
问题解决
3.k8s部署deploy报错0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.
4.rancher部署k8s时,报错iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 2380 -j DNAT --to-destination 172.17.0.2:1337 ! -i docker0: iptables: No chain/target/match by that name。原因是先启动的docker又关闭的防火墙,此时重启一下docker就可以拉
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?