Results 1 to 5 of 5
Hi all,
I am running centOS in my desktop and create one account for my friend to use it too. However, he complained that he cannot run under his account, ...
- 09-19-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
problem with java in user account
Hi all,
I am running centOS in my desktop and create one account for my friend to use it too. However, he complained that he cannot run under his account, it always tells OutOfMemoryError
But I still can use java using root account. I also check ulimit command and their are all unlimited.Code:java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:597) at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:703) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652) at org.mortbay.thread.concurrent.ThreadPool.dispatch(ThreadPool.java:103) at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:299) at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:306) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.Server.doStart(Server.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
Maybe the problem is my computer, it has only 1GB.
Would you please help me to solve this problem?
Thank you
- 09-20-2011 #2Just Joined!
- Join Date
- May 2011
- Location
- Malaysia
- Posts
- 39
Hi,
If i'm not mistaken ulimit governs open files and other resources.
The OOM issue could probably be about the JVM options not set.
Using your friend's login try launchng the java app with:
java -Xmx128m somejavaappname
- 09-20-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
Hi aazkan,
I also try your comment but the problem is still the same. Could you suggest me another ways?
Tks.
- 09-20-2011 #4Just Joined!
- Join Date
- May 2011
- Location
- Malaysia
- Posts
- 39
Hi again,
Did it throw another OOM when you started the java app when you used user login? May I have a look at the error msg when you tried running with the Xmx set?
Were you able to run the java app as root?
Try running it with these options
java -Xms128M -Xmx512M somejavaappname
And also when you're running the java app, can you tell me what's your free -m output?
- 09-21-2011 #5Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
Hi aazkan,
Sorry for my late response,
When I run java -jar myapp, the system throws this exception and terminate my job, so I cannot show you the result of command free -m during running this app. But this is the result of free -m when not running my app.
Moreover, running this app in another computer just takes only 30MB.Code:$ free -m total used free shared buffers cached Mem: 1001 745 255 0 136 490 -/+ buffers/cache: 118 882 Swap: 2000 0 1999
I also create a new user, and this new user can run my app without any exceptions. This is so weird. Do you have any ideas for this?
Thank you


Reply With Quote