Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jvm vdbench OutOfMemoryError无法创建新的本机线程_Jvm_Out Of Memory - Fatal编程技术网

Jvm vdbench OutOfMemoryError无法创建新的本机线程

Jvm vdbench OutOfMemoryError无法创建新的本机线程,jvm,out-of-memory,Jvm,Out Of Memory,我在以高队列深度(256)运行多个并发vdbench实例时遇到JVM错误 localhost-0.stdout.html的输出: 19:49:13.281 19:49:13.281 Started 1 Workload Generator threads. 19:49:13.345 19:49:13.345 Out of memory: 19:49:13.345 19:49:13.345 modify the vdbench script and increase the

我在以高队列深度(256)运行多个并发vdbench实例时遇到JVM错误

localhost-0.stdout.html的输出:

19:49:13.281 19:49:13.281 Started 1 Workload Generator threads.
19:49:13.345 19:49:13.345 Out of memory:
19:49:13.345
19:49:13.345             modify the vdbench script and increase the '-Xmx512m' value where 512m equals the java heap size requested.
19:49:13.345 19:49:13.345 If the error message says 'unable to create new native thread' modify the vdbench script adding '-Xss256k' or lower value for the java thread stack size.
19:49:13.345
19:49:13.345
19:49:13.345 19:49:13.345 Examples are for Solaris. For other platforms see the Java provider's documentation
19:49:13.346 19:49:13.345 Memory total Java heap:  253.000 MB; Free:  221.013 MB; Used:   31.987 MB;
19:49:13.346 java.lang.OutOfMemoryError: unable to create new native thread
19:49:13.346    at java.lang.Thread.start0(Native Method)
19:49:13.347    at java.lang.Thread.start(Thread.java:713)
19:49:13.347    at Vdb.SlaveWorker.StartIoThreads(SlaveWorker.java:329)
19:49:13.347    at Vdb.SlaveWorker.doRegularWorkload(SlaveWorker.java:211)
19:49:13.347    at Vdb.SlaveWorker.run(SlaveWorker.java:129)
19:49:13.347 java.lang.OutOfMemoryError: unable to create new native thread
19:49:13.347    at java.lang.Thread.start0(Native Method)
19:49:13.347    at java.lang.Thread.start(Thread.java:713)
19:49:13.347 19:49:13.347 common.failure(): System.exit(-99)
19:49:13.347    at Vdb.SlaveWorker.StartIoThreads(SlaveWorker.java:329)
19:49:13.347    at Vdb.SlaveWorker.doRegularWorkload(SlaveWorker.java:211)
19:49:13.347    at Vdb.SlaveWorker.run(SlaveWorker.java:129)

虽然我尝试过用“-Xmx512m,-Xss256k(最小可能值),-Xms256m”更改_JAVA_选项中的值,但错误仍然存在。有人对此有经验吗?

我已经找到了解决办法。以防万一,有人会顺道来

队列深度或线程数限制为系统允许的最大用户进程数(对于普通用户,默认值为1024)。在Linux中,您可以通过以下方式检查最大用户进程数限制:

# ulimit -a 
core file size          (blocks, -c) 0 
data seg size           (kbytes, -d) unlimited 
file size               (blocks, -f) unlimited 
pending signals                 (-i) 8191 
max locked memory       (kbytes, -l) 32 
max memory size         (kbytes, -m) unlimited 
open files                      (-n) 1024 
pipe size            (512 bytes, -p) 8 
POSIX message queues     (bytes, -q) 819200 
stack size              (kbytes, -s) 8192 
cpu time               (seconds, -t) unlimited 
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited 
file locks                      (-x) unlimited 
提高这个限额解决了我的问题。 您可以通过以下方式提高限额:

ulimit -u 4096
如果您正在使用CentOS,请编辑/etc/security/limits.d/90 nproc.conf 并将行更改为:

*软nproc 4096