[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Terracotta Server Array on openvz: java.lang.OutOfMemoryError: unable to create new native thread  XML
Forum Index -> General
Author Message
kayjay

neo

Joined: 07/28/2011 23:48:13
Messages: 5
Offline

Hi, everyone.
I`m trying to start Terracotta Server on openvz debian amd64 container. It`s giving me this:
Code:
 java.lang.RuntimeException: java.lang.OutOfMemoryError: unable to create new native thread
 	at com.tc.server.TCServerImpl.start(TCServerImpl.java:248)
 	at com.tc.server.TCServerMain.main(TCServerMain.java:30)
 Caused by: java.lang.OutOfMemoryError: unable to create new native thread
 	at java.lang.Thread.start0(Native Method)
 	at java.lang.Thread.start(Thread.java:640)
 	at java.util.Timer.<init>(Timer.java:137)
 	at com.tc.lang.ThrowableHandler.scheduleExit(ThrowableHandler.java:127)
 	at com.tc.lang.ThrowableHandler.handleThrowable(ThrowableHandler.java:96)
 	at com.tc.lang.TCThreadGroup.uncaughtException(TCThreadGroup.java:29)
 	at com.tc.lang.StartupHelper.startUp(StartupHelper.java:47)
 	at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:468)
 	at com.tc.server.TCServerImpl.start(TCServerImpl.java:245)
 	... 1 more
 

My ulimit -a says:
Code:
 core file size          (blocks, -c) 0
 data seg size           (kbytes, -d) unlimited
 scheduling priority             (-e) 0
 file size               (blocks, -f) unlimited
 pending signals                 (-i) 16382
 max locked memory       (kbytes, -l) 64
 max memory size         (kbytes, -m) unlimited
 open files                      (-n) 1024
 pipe size            (512 bytes, -p) 8
 POSIX message queues     (bytes, -q) 819200
 real-time priority              (-r) 0
 stack size              (kbytes, -s) 8192
 cpu time               (seconds, -t) unlimited
 max user processes              (-u) unlimited
 virtual memory          (kbytes, -v) unlimited
 file locks                      (-x) unlimited
 


What could possibly be wrong?
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1461
Offline

Hi ,

Can you please share details about your use case , configuration and client/server logs .

Rakesh Joshi
Terracotta.
kayjay

neo

Joined: 07/28/2011 23:48:13
Messages: 5
Offline

Sure. Config and logs attached. Use case: I have several Hibernate-powered apps, want to use Ehcache as L2C, each app is distributed, so, since cache names are the same for every app (they are simply entity names) I guess I need separate Server Array per app. I use openvz virtualization, so I thought it`d be nice to be able to run tc server in a container.
 Filename terracotta-server.log [Disk] Download
 Description Logs
 Filesize 193 Kbytes
 Downloaded:  46 time(s)

 Filename tc-config.xml [Disk] Download
 Description Configuration
 Filesize 29 Kbytes
 Downloaded:  60 time(s)

kayjay

neo

Joined: 07/28/2011 23:48:13
Messages: 5
Offline

Allright, seems I`ve got it. Besides 'ulimit' limits openvz also has 'user-beancounters' limits. I had the default 260 value for 'numproc' in my container - turns out Terracotta Server needs more. As a rule of thumb - if something fails complaining on any resource shortage - check /proc/user_beancounters.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.7 © JForum Team