Re: OutOfMemory errors with 2.1 JavaSpace

Brian Murphy <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Mark Kinzie wrote On 12/19/05 13:01,:
> I used to run into problems with getting OutOfMemory errors with my
> pre-2.0 version of persistent outrigger, so I put "-C-Xmx512m" on the
> command line when running rmid, and
> "-Dcom.sun.jini.outrigger.backend.vm.options=-Xss10m" when running
> outrigger.
>
> Now I've converted our system to use Jini 2.1, and my JavaSpace is
> running out of memory, so I want to do a similar thing.  I'm using Brian
> Murphy's example configuration and startup scripts, and using phoenix.
> But I'm not sure how to set the max heap size and thread stack size on
> the persistent outrigger when using phoenix and the new ServiceStarter
> framework.  Anyone know?

Hi Mark,

I believe something like the following may work for you:

I'm assuming you're starting a single activatable outrigger
under jeri, jrmp, or jsse. If that's the case, then the
config file you use to configure the ServiceStarter when
starting outrigger should be one of the following:

<install>/example/common/[jeri|jrmp|jsse]/config/
  start-one-activatable.config

In that file, add the desired system property to the
serverProperties entry. That is,

private static serverProperties = new String[]
{
 "java.security.debug", "${debug}",
 "java.util.logging.manager",     "${java.util.logging.manager}",
 "java.util.logging.config.file", "${java.util.logging.config.file}",

 "com.sun.jini.outrigger.backend.vm.options", "-Xss10m",

 "serviceClasspath", serviceClasspath,
 "serviceConfig",    serviceConfig,
 "serverHost",    "${serverHost}",
 "serviceName",   "${serviceName}",
 "interfaceName", "${interfaceName}",
 "implName",      "${implName}",
 "persistDir",    "${persistDir}",
 "jiniHome",      "${jiniHome}",
 "appHome",       "${appHome}"
};

This will set the indicated system property to the desired
value in the activation group VM in which outrigger is run.

For Phoenix, I believe you'll need to set the desired system
property directly on the command line executed to start
Phoenix. This means you'll need to modify the script used to
start Phoenix, rather than Phoenix's config file. Thus,
you'll need to modify one of the following files:

<install>/example/scripts/[jeri|jrmp|jsse]/
  start-phoenix(.bat)

depending on the protocol you use, and whether you're OS
is unix/linux or Windows.

In the script, you will see the command used to start
Phoenix. That command sets a number of system properties.
Add your desired system property to that command in a
fashion that's similar to the other properties.

I hope this helps,
Brian

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.