Out of memory: Kill process 記憶體不足

來源:互聯網
上載者:User

標籤:line   current   pos   one   cep   fail   div   是什麼   epo   

 

服務直接被 killed,感覺特別奇怪。代碼肯定是沒有問題的,但為什麼放到伺服器上就出錯了呢。 

部署時報錯如下:

Shell代碼  
  1. Failed to add the deployment content to the repository: java.util.concurrent.CancellationException: Operation was cancelled  


wildfly 報錯如下:

Shell代碼  
  1. ./standalone.sh: line 307: 12526 Killed   


一時還真看不出是什麼毛病。 

於是使用 dmesg 尋找原因,終於找到了原因: 

Shell代碼  
  1. # dmesg | tail  
  2. [1147898.706546] Out of memory: Kill process 12526 (java) score 399 or sacrifice child  
  3. [1147898.710393] Killed process 12526 (java) total-vm:2559448kB, anon-rss:403304kB, file-rss:780kB, shmem-rss:0kB  
  4. [1147898.738479] oom_reaper: reaped process 12526 (java), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB  


原來是因為記憶體不足導致了。我使用的伺服器記憶體只有 1G,上面跑了很多的服務,因此可以記憶體並不大,所以才出了問題。 

Out of memory: Kill process 記憶體不足

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.