首页 / JAVA / jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.
jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1803字,纯文字阅读大概需要3分钟。
内容图文
![jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.](/upload/InfoBanner/zyjiaocheng/1313/ca7de87622d44e6d8774f932a9cc0c84.jpg)
前言
在 linux 上执行jmeter 代码的时候遇到一个问题:There is insufficient memory for the Java Runtime Environment to continue.
报错内容
在 windows 先执行过 get_info.jmx,正常运行,传到 linux 上运行时遇到以下问题
[root@VM_0_2_centos ~]# jmeter -n -t get_info.jmx -l get.jtl
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error=‘Cannot allocate memory‘ (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /root/hs_err_pid25736.log
从报错可以应该是内存不够用了,free -m
查看内存
[root@VM_0_2_centos ~]# free -m
total used free shared buff/cache available
Mem: 3789 3295 152 12 341 179
Swap: 2047 2047 0
果然 free 内存只有 152 了
解决办法
先清理掉一些不用的进程,释放一些内存出来,再次查看,大于1G,基本上没啥问题了
[root@VM_0_2_centos easymock]# free -m
total used free shared buff/cache available
Mem: 3789 2390 875 12 524 1084
Swap: 2047 1478 569
再次运行
[root@VM_0_2_centos ~]# jmeter -n -t get_info.jmx -l get.jtl
Creating summariser <summary>
Created the tree successfully using get_info.jmx
Starting the test @ Sat May 30 17:01:31 CST 2020 (1590829291939)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary + 1 in 00:00:00 = 2.8/s Avg: 107 Min: 107 Max: 107 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0
summary + 299 in 00:00:03 = 86.8/s Avg: 29 Min: 10 Max: 224 Err: 0 (0.00%) Active: 0 Started: 3 Finished: 3
summary = 300 in 00:00:04 = 79.0/s Avg: 30 Min: 10 Max: 224 Err: 0 (0.00%)
Tidying up ... @ Sat May 30 17:01:36 CST 2020 (1590829296290)
... end of run
原文:https://www.cnblogs.com/yoyoketang/p/12993719.html
内容总结
以上是互联网集市为您收集整理的jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.全部内容,希望文章能够帮你解决jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Environment to continue.所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。