Author |
Message |
03/06/2013 09:38:43
|
suvigy
journeyman
Joined: 06/02/2012 06:16:57
Messages: 20
Offline
|
HI!
Now I've just download and I'm unable to start the free version of BigMemory MAX (4.0) If I set the offheap size in tc-config.xml (even lower than set in the -XX:MaxDirectMemorySize) I get the following error:
2013-03-06 18:18:47,143 INFO - Available Max Runtime Memory: 989MB
2013-03-06 18:18:47,403 ERROR - The JVM argument -XX:MaxDirectMemorySize(64m) ca
nnot be less than TC minimum Direct memory requirement: 171m
Although I've put -XX:MaxDirectMemorySize in start-tc-server.bat:
:START_TCSERVER
%JAVA_COMMAND% -XX:MaxDirectMemorySize=3072m %JAVA_OPTS% -cp %CLASSPATH% com.tc.server.TCServerMain %*
tc-config.xml
<offheap>
<!-- If 'true', active servers spill cached data to off-heap memory
before persisting it to disk. Data that is cached off-heap
provides faster access than data stored on disk.
Default: false
-->
<enabled>true</enabled>
<!-- Sets the maximum amount of off-heap memory that a server
can use. Values are given in k (Kilobytes), m (Megabytes)
or g (Gigabytes).
Default: none
-->
<maxDataSize>2g</maxDataSize>
</offheap>
If I disable offheap (and restartibility) then I also get an error:
2013-03-06 18:22:48,036 INFO - Available Max Runtime Memory: 989MB
2013-03-06 18:22:48,448 INFO - JMX Server started. Available at URL[service:jmx:
jmxmp://0.0.0.0:9520]
2013-03-06 18:22:54,075 INFO - Becoming State[ ACTIVE-COORDINATOR ]
2013-03-06 18:22:54,129 INFO - Terracotta Server instance has started up as ACTI
VE node on 0:0:0:0:0:0:0:0:9510 successfully, and is now ready for work.
mßrc. 06, 2013 6:22:55 DU com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
com.terracotta.management
net.sf.ehcache.management
mßrc. 06, 2013 6:22:55 DU com.sun.jersey.api.core.ScanningResourceConfig logClas
ses
INFO: Root resource classes found:
class com.terracotta.management.resource.services.TopologyResourceServiceImpl
class com.terracotta.management.resource.services.DiagnosticsResourceServiceIm
pl
class com.terracotta.management.resource.services.BackupResourceServiceImpl
class com.terracotta.management.resource.services.ConfigurationResourceService
Impl
class com.terracotta.management.resource.services.LogsResourceServiceImpl
class net.sf.ehcache.management.resource.services.ElementsResourceServiceImpl
class net.sf.ehcache.management.resource.services.CachesResourceServiceImpl
class com.terracotta.management.resource.services.OperatorEventsResourceServic
eImpl
class net.sf.ehcache.management.resource.services.CacheConfigsResourceServiceI
mpl
class net.sf.ehcache.management.resource.services.CacheStatisticSamplesResourc
eServiceImpl
class net.sf.ehcache.management.resource.services.CacheManagersResourceService
Impl
class com.terracotta.management.web.resource.services.IdentityAssertionResourc
eService
class net.sf.ehcache.management.resource.services.AgentsResourceServiceImpl
class net.sf.ehcache.management.resource.services.CacheManagerConfigsResourceS
erviceImpl
class com.terracotta.management.resource.services.ShutdownResourceServiceImpl
class com.terracotta.management.resource.services.MonitoringResourceServiceImp
l
mßrc. 06, 2013 6:22:55 DU com.sun.jersey.api.core.ScanningResourceConfig logClas
ses
INFO: Provider classes found:
class net.sf.ehcache.management.resource.exceptions.DefaultExceptionMapper
class net.sf.ehcache.management.resource.exceptions.WebApplicationExceptionMap
per
class net.sf.ehcache.management.resource.exceptions.ResourceRuntimeExceptionMa
pper
mßrc. 06, 2013 6:22:55 DU com.sun.jersey.server.impl.application.WebApplicationI
mpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.16 11/28/2012 02:09 PM'
I'm testing it on a 32-bit Windows7 (virtual machine), with java version "1.7.0_11"
Best Regards
suvigy
|
|
|
03/06/2013 17:00:00
|
dkumar
neo
Joined: 03/06/2013 16:24:06
Messages: 4
Location: San Francisco
Offline
|
The second message is not an exception, it is printed each time the server starts normally.
Are you sure you're not overriding the direct memory size from some other command?
|
--
Dhruv Kumar
Software Engineer
Terracotta |
|
|
03/07/2013 10:16:42
|
suvigy
journeyman
Joined: 06/02/2012 06:16:57
Messages: 20
Offline
|
Yes, you're right, thnx..I've just issued an echo command for JAVA_COMMAND, and got the output:
c:\java\jdk7u11\bin\java -server -XX:MaxDirectMemorySize=2147483647
so I could one step further by setting offheap size 2005m
<offheap>
<enabled>true</enabled>
<maxDataSize>2005m</maxDataSize>
</offheap>
But now I get another error, when starting tc-server:
2013-03-07 19:02:51,265 INFO - Available Max Runtime Memory: 989MB
2013-03-07 19:02:51,650 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520]
java.lang.AssertionError: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: An attempt was made to allocate more off-heap memory than
the JVM can allow. The limit on off-heap memory size is given by the -XX:MaxDirectMemorySize command (or equivalent).
at com.tc.objectserver.persistence.Persistor.start(Persistor.java:76)
at com.tc.objectserver.persistence.RestartablePersistor.start(RestartablePersistor.java:34)
at com.tc.objectserver.impl.DistributedObjectServer.start(DistributedObjectServer.java:517)
at com.tc.server.TCServerImpl.startDSOServer(TCServerImpl.java:562)
at com.tc.server.TCServerImpl.access$600(TCServerImpl.java:100)
at com.tc.server.TCServerImpl$StartAction.execute(TCServerImpl.java:500)
at com.tc.lang.StartupHelper.startUp(StartupHelper.java:38)
at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:545)
at com.tc.server.EnterpriseServerImpl.startServer(EnterpriseServerImpl.j
ava:78)
at com.tc.server.TCServerImpl.start(TCServerImpl.java:309)
at com.tc.server.TCServerMain.main(TCServerMain.java:30)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentExc
eption: An attempt was made to allocate more off-heap memory than the JVM can al
low. The limit on off-heap memory size is given by the -XX:MaxDirectMemorySize c
ommand (or equivalent).
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at com.tc.objectserver.persistence.Persistor.start(Persistor.java:74)
... 10 more
Caused by: java.lang.IllegalArgumentException: An attempt was made to allocate more off-heap memory than the JVM can allow. The limit on off-heap memory size is
given by the -XX:MaxDirectMemorySize command (or equivalent).
at com.terracottatech.offheapstore.paging.UpfrontAllocatingPageSource.<i
nit>(UpfrontAllocatingPageSource.java:118)
at com.terracottatech.offheapstore.paging.UpfrontAllocatingPageSource.<i
nit>(UpfrontAllocatingPageSource.java:96)
at com.terracottatech.corestorage.bigmemory.AbstractOffHeapKeyValueStora
geFactory.<init>(AbstractOffHeapKeyValueStorageFactory.java:31)
at com.terracottatech.corestorage.bigmemory.restartable.RestartableOffHe
apKeyValueStorageFactory.<init>(RestartableOffHeapKeyValueStorageFactory.java:48
)
at com.terracottatech.corestorage.bigmemory.restartable.RestartableManag
er.createFactory(RestartableManager.java:114)
at com.terracottatech.corestorage.bigmemory.restartable.RestartableManag
er.access$000(RestartableManager.java:54)
But now I have -XX:MaxDirectMemorySize=2147483647...
Am I still missing something?
Thnx
|
|
|
03/11/2013 13:28:30
|
suvigy
journeyman
Joined: 06/02/2012 06:16:57
Messages: 20
Offline
|
Ok, I think the problem was that I had low memory settings in the virtual machine
|
|
|
|