ulimit命令&pthread_create() error: Resource temporarily unavailable
http://www.ibm.com/developerworks/cn/linux/l-cn-ulimit/
https://my.vertica.com/docs/5.0/HTML/Master/16468.htm
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
可以看到stack size是8M, 400个线程就需要8*400=3200M,虚拟内存不够用。
解决办法有两种:
1.使用ulimit -s 1024*1024命令,将线程栈大小临时设置成1M,经过试验能同时创建2000个线程了。
2.使用pthread_attr_setstacksize在程序中改变线程栈大小。
ulimit命令&pthread_create() error: Resource temporarily unavailable的更多相关文章
- error=11, Resource temporarily unavailable
问题1:Cannot run program "/bin/ls": error=11, Resource temporarily unavailable 1 15/04/22 14 ...
- TNS-12518,TNS-12536,TNS-00506,Linux Error: 11: Resource temporarily unavailable
TNS-12518: TNS:listener could not hand off client connection TNS-12536: TNS:operation would block T ...
- Linux重启mysql Error getting authority: Error initializing authority: Could not connect: Resource temporarily unavailable (g-io-error-quark, 27)
问题: Linux下重启mysql: systemctl restart mysqld 出现以下错误: Error getting authority: Error initializing auth ...
- Resource temporarily unavailable
数据库版本:5.5.14 操作系统版本:contos 6.3 服务器256G内存,安装90个实例.通过脚本启动90个mysql数据库实例,会有几个实例无法启动,进程启动后直接被杀死.查看mysql日志 ...
- linux 程序无缘无故推出 没有core文件 broken pipe Resource temporarily unavailable
问题 1. linux socket 服务端程序 无缘无故退出 . 2. 客户端大量访问服务端后,出现 Resource temporarily unavailable错误 问题分析: 1. 是否有 ...
- -bash: fork: retry: Resource temporarily unavailable
登陆不了服务器The server refused to start a shell. 登陆服务器后执行ls命令报错: 1 2 $ls -bash: fork: retry: Resource t ...
- su: cannot set user id: Resource temporarily unavailable
今天R&D所在主机出现su: cannot set user id: Resource temporarily unavailable资源不可用报错,直接通过其他机器ssh huyuh@xxx ...
- Resource temporarily unavailable用户的连接数设置的太小
-bash:fork:Resource temporarily unavailable的问题 出现这个问题的原因是linux用户的连接数设置的太小,只要修改max user processes就可 ...
- “su: cannot set user id: Resource temporarily unavailable”处理及limits.conf说明
一.背景介绍及问题处理 应用报账号不能ssh到主机,首先怀疑是防火墙或hosts.deny限制但查看之下并没有:接着使用其提供的账号密码确实不能登录,怀疑是密码被修改(有个和平时不太一样现像是输入密码 ...
随机推荐
- 二、源代码=>程序集及程序集概念介绍
文本脉络图如下: 一.源代码-面向CLR的编译器-托管模块-(元数据&IL代码)中介绍了编译器将源文件编译成托管模块(中间语言和元数据),本文主要介绍如何将托管模块合并成程序集. 1.程序集的 ...
- 利用wget配合bash脚本同时下载多个文件
先把需要下载的文件写入到一个文件中,命名为urls.txt,比如: http://blog.is36.com/a.jpg http://blog.is36.com/b.jpg http://blog. ...
- gcc 编译问题
一般情况一句话即可: gcc -o fuck fuck.c ./fuck 直接运行了 问题 1. 报错 ld 未找到 此时,gcc编译得分布来,并且指定特定的ld gcc -c 1.c //会在目录 ...
- 【数组】Rotate Image
题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwis ...
- Ubuntukylin-14.04-desktop(带分区)安装步骤详解
不多说,直接上干货! 成功! Ubuntukylin-14.04-desktop( 不带分区)安装步骤详解 Ubuntukylin-14.04-desktop( 不带分区)安装步骤详解 Ubuntu1 ...
- numpy.linalg.norm(求范数)
1.linalg=linear(线性)+algebra(代数),norm则表示范数. 2.函数参数 x_norm=np.linalg.norm(x, ord=None, axis=None, keep ...
- logback 日志打印输出
slf4j 其实是一个日志的抽象层, 其本质仍然需要真正的实现 他可以解决代码中独立于任意特定的日志类库, 可以减少很多维护日志的麻烦, 除此之外, 还有占位符的特性, {}, 类似于String#f ...
- C语言求数组的第二大数
nt second(int value[],int n) { ]; ]; ; ;i < n;i++) { if(value[i] > first) { second = first; fi ...
- 简单Tomcat HTTP RPC框架
RPC基础知识 什么是RPC? RPC(Remote Procedure Call Protocol)——远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议. ...
- elasticsearch分析系列
http://www.opscoder.info/category/ElasticSearch/?page=2 https://www.jianshu.com/p/0908b9ee65fc https ...