playframework-IOException无法分配内存 [英] playframework - IOException unable to allocate memory

查看:84
本文介绍了playframework-IOException无法分配内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统是Mint 12 64bit.

My system is Mint 12 64bit.

我已经安装了类型安全堆栈并创建了一个新的play应用程序.在不修改代码的情况下,我尝试运行它.这是输出:

I've installed the typesafe stack and created a new play application. Without modifying the code I've tried to run it. This is the output:

http://pastebin.com/6XwmsbAE

播放抱怨此错误消息:

IOException: Cannot run program "javac": java.io.IOException: error=12, Cannot allocate memory 

我该如何解决?

更新:

@Mef

好吧,你绝对是对的.我已经将初始RAM从1 GB增加到2 GB(在virtualbox上运行).编译只进行了一次.

Ok you were definitely right. I've increased the initial RAM from 1 GB to 2 GB (running this on virtualbox). Compiling worked exactly once.

不幸的是,java已经下定决心,即使2 GB还是不够的:运行eclipse和firefox,我的系统使用1 GB.然后,我开始sbt,内存使用量增加到约1.2 GB.有人可能认为这足够了.不是.尽管仍然有800 MB可用,但编译失败并出现相同的错误.此外,在尝试编译应用程序后,内存使用量高达1.6 GB.即使在编译项目时,也足够奇怪,它从未达到2 GB,但最高达到1.8 GB.

Unfortunately java has made up his mind that even 2 GB aren't enough: Running eclipse and firefox my system uses 1 GB. Then I start sbt and the memory usage rises to about 1.2 GB. One might think that this is sufficient. It isn't. Compilation fails with the same error although 800 MB are still available. Moreover after trying to compile the application the memory usage goes up to 1.6 GB. Strangely enough even while compiling the project it never reaches 2 GB but peaks at about 1.8 GB.

尽管如此,我还是再次尝试了,并向虚拟机提供了3 gigs RAM.现在,编译并运行该应用程序可以正常工作.作为另一个具有3 GB可用空间的奇迹,内存使用量永远不会超过1.6 GB,而远低于我在2 GB迭代中看到的最大1.8 GB.

Nevertheless I've tried again and fed 3 gigs of RAM to the virtual machine. Now compiling and running the application works fine. As another miracle with 3 GB available the memory usage never rises above 1.6 GB and stays well below the maximum of 1.8 GB that I saw in the 2 GB iteration.

推荐答案

由于这是一个常见的javac错误,因此我怀疑它与Play有关.您很可能确实耗尽了内存.

Since this is a general javac error, I doubt that it is Play related. Most likely you really ran out of memory.

这篇关于playframework-IOException无法分配内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆