最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

java本機(jī)內(nèi)存分配Native?memory?allocation?mmap失敗問題解決

 更新時(shí)間:2023年11月03日 09:18:13   作者:豐木  
這篇文章主要介紹了java本機(jī)內(nèi)存分配Native?memory?allocation?mmap失敗問題解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

1. 報(bào)錯(cuò)

jenkins中啟動(dòng)java的jar包起不來, 最終原因是沒有swap空間。

> OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000795380000, 591396864, 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 591396864 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid23.log

2. 查看服務(wù)器內(nèi)存

[root@me opt]# free -m
              total        used        free      shared  buff/cache   available
Mem:          31490       28715        2018           9         756        2380
Swap:             0           0           0
[root@me opt]# free -g
              total        used        free      shared  buff/cache   available
Mem:             30          28           1           0           0           2
Swap:             0           0           0

3. 操作

[root@me opt]# dd if=/dev/zero of=swapfile bs=1024 count=500000
500000+0 records in
500000+0 records out
512000000 bytes (512 MB) copied, 1.41014 s, 363 MB/s
[root@me opt]# mkswap swapfile
Setting up swapspace version 1, size = 499996 KiB
no label, UUID=6f2e755d-d294-4f4c-8671-d965ae9d15e5
[root@soin opt]# swapon swapfile
swapon: /opt/swapfile: insecure permissions 0644, 0600 suggested.
[root@me opt]# free -h
              total        used        free      shared  buff/cache   available
Mem:            30G         28G        1.4G        9.1M        1.3G        2.3G
Swap:          488M          0B        488M

4. 解釋說明:

4.1 root權(quán)限下,創(chuàng)建swapfile

第一步:創(chuàng)建一個(gè)大小為500M的文件dd if=/dev/zero of=swapfile bs=1024 count=500000

4.2 將swapfile設(shè)置為swap空間

(第二步:把這個(gè)文件變成swap文件)mkswap swapfile

4.3 啟用交換空間,感同mount操作

swapon swapfile (刪除交換空間 swapoff swapfile)

以上就是java本機(jī)內(nèi)存分配Native memory allocation mmap失敗問題解決的詳細(xì)內(nèi)容,更多關(guān)于java本機(jī)內(nèi)存分配的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論

平塘县| 平昌县| 乐安县| 黑龙江省| 嘉定区| 苍梧县| 拉萨市| 鄂托克前旗| 丰都县| 沧源| 汝州市| 达孜县| 拉萨市| 嘉荫县| 彝良县| 曲周县| 辰溪县| 蓬溪县| 丹巴县| 酉阳| 高密市| 临颍县| 临海市| 鹤岗市| 正镶白旗| 阿鲁科尔沁旗| 大姚县| 清河县| 临洮县| 防城港市| 衡阳市| 长乐市| 融水| 乌兰察布市| 涡阳县| 图片| 盐亭县| 汾阳市| 九龙坡区| 淮滨县| 广灵县|