it won't be a jvm.config file, if railo is running on resin the memory
related jvm arguments are in start.bat, e.g
  httpd.exe -conf conf/resin.conf -java_home jre -java_exe jre\bin\java
-Xmn100M -Xms512M -Xmx1024M

if its tomcat then they should be in tomcat/bin/setenv.bat or possibly
directly entered into catalina.bat, e.g
  set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m

if you're on linux then those files will be .sh rather than .bat

Chris

On 23 July 2010 21:56, Dan Wilson <[email protected]> wrote:

> Jeff,
>
> You say you have 2GB of ram, but you also say you have memory problems.
>
> Depending on which Operating System you have, you might only be able to
> address 1.2 GB of Ram in your JVM. Furthermore, if you don't know how to
> tune your JVM, it's likely your JVM settings are stock, which isn't good at
> all.
>
> I don't use Railo so I have no idea how it ships. But CF ships with 512MB
> of ram for the main heap. This used to be a lot, but then again, I remember
> when a 4GB hard drive was cavernous, know what I'm saying?
>
> I'm going to help you out a little bit and you've got to do the rest of the
> work because you'll have some particulars with Railo that I won't be able to
> help with.
>
>  We are going to start by adjusting your JVM settings. In your Railo
> install or in your Tomcat or whatever, you'll find a jvm.config file. Paste
> the contents of that file into http://modelglue.pastebin.com
>
> Then send the URL in your next email to the group.
>
> I'll make some adjustments, you can (after making a backup copy) replace
> your old file with the new file, then try your application again. You'll
> find instant relief. The question will be how much relief will you need.
>
> I'll also want to know the following:
>
> What OS are you using ( and version )
> What web server are you using?
> Is the web server on the same machine?
>  Are you using a database? If so, is the database on the same machine as
> Railo?
> What percentage free memory do you have on the machine BEFORE you start
> Railo?
>
>
>
> DW
>
>
> On Fri, Jul 23, 2010 at 4:42 PM, jeff <[email protected]> wrote:
>
>>
>> On Jul 23, 12:36 pm, Dan Wilson <[email protected]> wrote:
>> > Interesting Idea. You should be able to make this work, assuming the
>> > following:
>> >
>> > 1- You are on 64 Bit with good memory
>>
>> Why would it need to be 64 bit.  I'm currently running 2gb ram.  not
>> sure if 32 or 64 bit. why would that matter.
>>
>> > 2- You've tuned your JVM (the stock CF settings won't work for you)
>>
>> Aha, and I have no idea how to do that.  Also I am running railo if
>> that matters.
>>
>> >
>> > Another idea would be to wrap up the specifics of the domain into a CFC
>> > called CurrentDomainLoader.  This would be a CFC with only one method
>> that
>> > returns the current domain for the current request.
>> >
>> > You'd then be able to call this CFC whenever you need the domain to
>> service
>> > a request. That way, everything pipes through a single CFC base, and
>> your
>> > CurrentDomainLoader handles loading the specificity for the current
>> request.
>> >
>> > DW
>> >
>> >
>> >
>> > On Fri, Jul 23, 2010 at 2:27 PM, jeff <[email protected]> wrote:
>> > > As my application scales, my ram keeps getting eaten up.  And based on
>> > > the traffic coming to the server, I wonder If my architecture needs
>> > > some adjustment to function better.
>> >
>> > > Basically this is how things work:
>> > > There are lots of domains all configured to use this same model-glue
>> > > application.  The magic happens in the init() function in the
>> > > controller where I figure out which domain is being loaded, and then I
>> > > load ALL the cfcs into the variables scope like this:
>> >
>> > > <cffunction name="Init" access="Public" returnType="Controller"
>> > > output="false" hint="I build a new SampleController">
>> > >  <cfargument name="ModelGlue" required="true"
>> > > type="ModelGlue.ModelGlue" />
>> > >  <cfargument name="InstanceName" required="true" type="string" />
>> > >  <cfset super.Init(arguments.ModelGlue) />
>> > > <!--- Turns out we don't need this after all.  We'll keep it here just
>> > > in case we do down the road.
>> > >        <!--- get the model glue coldspring global config bean --->
>> > >        <cfset var mgConfig =
>> > > getModelGlue().getBean("modelGlueConfiguration") />
>> > >        <!--- grab the variables we'll need to reload the site. (this
>> is
>> > > used
>> > > when resetting themes!) --->
>> > >        <cfset variables.reloadKey = mgConfig.getReloadKey() />
>> > >        <cfset variables.getReloadPassword =
>> mgConfig.getReloadPassword() />
>> > >  --->
>> >
>> > >        <!--- Get all of our app settings --->
>> > >        <cfset var appSettings = getModelGlue().getBean("appSettings")
>> />
>> >
>> > >        <!--- load config settings here --->
>> > >        <cfset variables.dsn = appSettings.getConfigSetting("dsn") />
>> >
>> > >        <!--- Load up the site configuration settings here --->
>> > >        <cfset variables.siteSettingsCFC = createObject("component",
>> > > "model.siteSettings").init(variables.dsn,cleanURL(CGI.SERVER_NAME)) />
>> > >        <cfset variables.siteID = variables.siteSettingsCFC.getSiteID()
>> />
>> >
>> > >        <!--- database interaction CFCS --->
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> > >        <cfset variables.exampleCFC = createObject("component",
>> > > "model.example").init(variables.dsn,variables.siteID) />
>> >
>> > >  <cfreturn this />
>> > > </cffunction>
>> >
>> > > -------------------------
>> >
>> > > After this occurs we basically have an isolated model-glue application
>> > > loaded for each domain, which makes it easy to keep all the data
>> > > separate.  But I am now wondering if this is eating up all the memory
>> > > and there is a better way to design my application; perhaps creating
>> > > the objects on demand instead of instantiating them into memory in the
>> > > init().
>> >
>> > > --
>> > > Model-Glue Sites:
>> > > Home Page:http://www.model-glue.com
>> > > Documentation:http://docs.model-glue.com
>> > > Bug Tracker:http://bugs.model-glue.com
>> > > Blog:http://www.model-glue.com/blog
>> >
>> > > You received this message because you are subscribed to the Google
>> > > Groups "model-glue" group.
>> > > To post to this group, send email to [email protected]
>> > > To unsubscribe from this group, send email to
>> > > [email protected]<model-glue%[email protected]>
>> <model-glue%[email protected]<model-glue%[email protected]>
>> >
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/model-glue?hl=en
>> >
>> > --
>> > William Osler - "We are here to add what we can to life, not to get what
>> we
>> > can from life."
>>
>> --
>> Model-Glue Sites:
>> Home Page: http://www.model-glue.com
>> Documentation: http://docs.model-glue.com
>> Bug Tracker: http://bugs.model-glue.com
>> Blog: http://www.model-glue.com/blog
>>
>> You received this message because you are subscribed to the Google
>> Groups "model-glue" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<model-glue%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/model-glue?hl=en
>>
>
>
>
> --
> William Osler - "We are here to add what we can to life, not to get what we
> can from life."
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to