Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Embedded GigaSpaces

When starting GigaSpaces to run in embedded mode, it seems that it uses up a lot of threads probably 100+ threads. Is there a way to reduce the usage of threads without sacrificing much? In addition to that, it seems that when I redeployed the app, I still saw some old threads living around. Is there a way to clean it up correctly when redeploying? Please note that I deploy JSpaces.jar as a part of the application.

The examples are: multicast discovery announcement listener multicast announcement timer Cache PersistentGC Statistics-Task RecentsFifoThread Pending Answers-pool-XX-thread-XX Processor-pool-XX-thread-XX Notifier-pool-XX-thread-XX LRMI Selector Thread-XX LRMI Connection--pool-XX-thread-XX

for each space, there are Local Transaction Reaper Lease Manager Reaper Lease Manager Reaper

Thanks a lot

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2128]{quote}

asked 2007-06-05 10:31:04 -0500

testy gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

See info here:

At the space schema have this:


<!maximum threads in engine>


At the space container have this:



answered 2007-06-06 03:22:03 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Thank you. I'll try that. How about thread leak when redeploy? Is there a way to unload GigaSpaces properly? After 3-4 redeploy, I ended having 600++ threads in memory

testy gravatar image testy  ( 2007-06-06 06:01:00 -0500 )edit

Hi Shay,

Is there a way to ensure that every thread has been shutdown properly? When I shut down all the containers, I still see a lot of threads hanging in the process.


testy gravatar image testy  ( 2007-06-21 12:32:02 -0500 )edit

This is a known issue.
6.0 will have most of these dangling threads fixed.


shay hassidim gravatar image shay hassidim  ( 2007-06-21 13:47:01 -0500 )edit


I tried 6.0 and it seemed that the dangling threads are fewer after the shutdown. The remaining threads are:

RMI ConnectionExpiration RMI LeaseChecker RMI RenewClean RMI TCP Accept RMI TCP Connection

{code} for (int i = 0; i < 80; i++) { IMap map = (IMap) CacheFinder.find("/./testCache?schema=mycache&versioned=false&create=true&noCache=false", props); IRemoteJSpaceAdmin jSpaceAdmin = (IRemoteJSpaceAdmin) map.getMasterSpace().getAdmin(); jSpaceAdmin.stop(); map.getMasterSpace().getContainer().shutdown(); } {code}

testy gravatar image testy  ( 2007-08-24 09:46:00 -0500 )edit

Please do not call the CacheFinder.find more than once with the same URL. With embedded space it will start multiple embedded spaces with the same identity as part of the application JVM. We will block this in the future.

To answer your question - see: http://www.gigaspaces.com/wiki/displa...


shay hassidim gravatar image shay hassidim  ( 2007-08-24 10:23:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2007-06-05 10:31:04 -0500

Seen: 120 times

Last updated: Jun 06 '07