You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by William Kuhn <wk...@biostat.ufl.edu> on 2000/02/15 05:35:25 UTC

cocoon install question

I posted some questions/problems I was having getting cocoon installed,
but never got any replies.

In the meantime I managed to figure out that one problem was that cocoon
was complaining about not enough memory.  I'm running it on rh6.1.  I
read the documentation that addressed this condition and was even more
confused.  It said the preferred method of solving this problem is to
pass command line options to the java interpreter.  I tracked down the
correct property in one of the jserv configuration files, but prior to
adding the options (-Xms and -Xmx) I figured I'd try the options on the
command line.  I'm not sure what units the memory are to be given in
(bytes, kb, or mb??) so I tried sensible options for all three with no
success.  What I mean by sensible is that the minimum initial (-Xms)
needs to be less than the max (-Xmx).  In all cases, however, I received
an error message that said that the minimum must be less than the
maximum which didn't make any sense since I had set the minimum less
than the maximum.

So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
(from the default of 2x10^5) and that didn't help.  Reading the
documentation a little further it appeared that *decreasing* this
setting might help get cocoon working (albeit not optimally) so I
dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
this approach and would like some advice on how to set up cocoon
properly for production use.  Any help would be appreciated.

Okay, so now cocoon is running but when I request .xml documents my web
server returns the .xml file rather than passing the request to the
cocoon servlet.  I followed the instructions and added the ApJservAction
line to jserv.conf.  I saw mention on a message board that Action and
AddHandler could somehow be used to overcome this problem, but what I
read didn't give specifics.  I could use any help I can get.  The only
way I can run cocoon currently is to request (for example)
http://localhost/servlets/cocoon/somepath/somefile.xml.

I'd be very appreciative if someone could take a couple of minutes to
help me.  I think that cocoon is a powerful tool and I have several
applications for it that are on hold until I can get it working
properly.

Thanks in advance for whoever answers.

-Bill
-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: cocoon install question

Posted by William Kuhn <wk...@biostat.ufl.edu>.
Michele,

Awesome!  Thanks a lot for the help.

I guess I didn't understand the format of the parameter to pass.  I
tried -Xms 4000000 and other variations and I couldn't find
documentation on the java command line options.

Thanks again for the help.  I made the change to jserv.properties,
restarted apache, and cocoon registers the memory.

-Bill

Michele Bianchi wrote:
> 
> On Mon, 14 Feb 2000, William Kuhn wrote:
> 
> > In the meantime I managed to figure out that one problem was that cocoon
> > was complaining about not enough memory.  I'm running it on rh6.1.  I
> 
> i resolved the problem adding this line to jserv.properties (i use apache jserv
> 1.1)
> 
> wrapper.bin.parameters="-ms4M"
> 
> that sets 4mb to the virtual machine (1.1), if you have the 1.2 is -Xms4M
> 
> michele
> 
> -------------------------------------------------------------------------------
> michele bianchi - telcordia technologies               http://mic.aesthetica.it
> 445 south street, mcc 1d316r                                  t +1 973 829 4117
> morristown, nj 07960                                          f +1 973 829 5981

-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: cocoon install question

Posted by Michele Bianchi <mi...@research.telcordia.com>.
On Mon, 14 Feb 2000, William Kuhn wrote:

> In the meantime I managed to figure out that one problem was that cocoon
> was complaining about not enough memory.  I'm running it on rh6.1.  I

i resolved the problem adding this line to jserv.properties (i use apache jserv
1.1)

wrapper.bin.parameters="-ms4M"

that sets 4mb to the virtual machine (1.1), if you have the 1.2 is -Xms4M

michele

-------------------------------------------------------------------------------
michele bianchi - telcordia technologies               http://mic.aesthetica.it
445 south street, mcc 1d316r                                  t +1 973 829 4117
morristown, nj 07960                                          f +1 973 829 5981


Re: cocoon install question

Posted by William Kuhn <wk...@biostat.ufl.edu>.
Donald,

Thanks for the help.  I didn't realize that this wasn't the right
mailing list.  I guess in my mind my questions were cocoon related, but
as I got to the heart of the problems they turned out to be java and
jserv/apache related.  Another member of this list already responded
similarly with respect to my java related question.  Not that it matters
now, but I'm running sun's jdk1.2.2. :-)

Your Action/AddHandler suggestion worked perfectly.  Thanks.

Thanks for your assistance and sorry again to you and other members of
the list for introducing and irrelevant post.

-Bill
Donald Ball wrote:
> 
> On Mon, 14 Feb 2000, William Kuhn wrote:
> 
> > In the meantime I managed to figure out that one problem was that cocoon
> > was complaining about not enough memory.  I'm running it on rh6.1.  I
> > read the documentation that addressed this condition and was even more
> > confused.  It said the preferred method of solving this problem is to
> > pass command line options to the java interpreter.  I tracked down the
> > correct property in one of the jserv configuration files, but prior to
> > adding the options (-Xms and -Xmx) I figured I'd try the options on the
> > command line.  I'm not sure what units the memory are to be given in
> > (bytes, kb, or mb??) so I tried sensible options for all three with no
> > success.  What I mean by sensible is that the minimum initial (-Xms)
> > needs to be less than the max (-Xmx).  In all cases, however, I received
> > an error message that said that the minimum must be less than the
> > maximum which didn't make any sense since I had set the minimum less
> > than the maximum.
> 
> These parameters are JVM specific. You don't say in this post what JVM
> you're using, nor is this necessary the appropriate forum for such
> questions. You will almost certainly have better luck going through the
> docs for your JVM or posting to a list for your JVM. That being said,
> however, if you're using JDK-1.2.x for Linux, you can type:
> 
> java -X
> 
> for a list of nonstandard options. Likely you want something like this:
> 
> java -Xms16m -Xmx64m
> 
> minimum 16m, maximum 64m.
> 
> > So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
> > (from the default of 2x10^5) and that didn't help.  Reading the
> > documentation a little further it appeared that *decreasing* this
> > setting might help get cocoon working (albeit not optimally) so I
> > dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
> > this approach and would like some advice on how to set up cocoon
> > properly for production use.  Any help would be appreciated.
> 
> The store.memory property apparantly is just a sanity check - it's the
> number of bytes that must be free what cocoon starts or else there's a
> good chance that we'll run out of memory at some point. I think this is an
> ugly hack, myself. Upping the maximum amount of memory allowed for your
> JVM should help.
> 
> > Okay, so now cocoon is running but when I request .xml documents my web
> > server returns the .xml file rather than passing the request to the
> > cocoon servlet.  I followed the instructions and added the ApJservAction
> > line to jserv.conf.  I saw mention on a message board that Action and
> > AddHandler could somehow be used to overcome this problem, but what I
> > read didn't give specifics.  I could use any help I can get.  The only
> > way I can run cocoon currently is to request (for example)
> > http://localhost/servlets/cocoon/somepath/somefile.xml.
> 
> in your .htaccess files:
> 
> Action cocoonparse /servlets/cocoon
> AddHandler cocoonparser .xml
> 
> That's what I use. More questions regarding this likely oughta be taken to
> the apache-jserv-users list - you'll get faster better answers. :)
> 
> - donald

-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: cocoon install question

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 14 Feb 2000, William Kuhn wrote:

> In the meantime I managed to figure out that one problem was that cocoon
> was complaining about not enough memory.  I'm running it on rh6.1.  I
> read the documentation that addressed this condition and was even more
> confused.  It said the preferred method of solving this problem is to
> pass command line options to the java interpreter.  I tracked down the
> correct property in one of the jserv configuration files, but prior to
> adding the options (-Xms and -Xmx) I figured I'd try the options on the
> command line.  I'm not sure what units the memory are to be given in
> (bytes, kb, or mb??) so I tried sensible options for all three with no
> success.  What I mean by sensible is that the minimum initial (-Xms)
> needs to be less than the max (-Xmx).  In all cases, however, I received
> an error message that said that the minimum must be less than the
> maximum which didn't make any sense since I had set the minimum less
> than the maximum.

These parameters are JVM specific. You don't say in this post what JVM
you're using, nor is this necessary the appropriate forum for such
questions. You will almost certainly have better luck going through the
docs for your JVM or posting to a list for your JVM. That being said,
however, if you're using JDK-1.2.x for Linux, you can type:

java -X

for a list of nonstandard options. Likely you want something like this:

java -Xms16m -Xmx64m

minimum 16m, maximum 64m.

> So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
> (from the default of 2x10^5) and that didn't help.  Reading the
> documentation a little further it appeared that *decreasing* this
> setting might help get cocoon working (albeit not optimally) so I
> dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
> this approach and would like some advice on how to set up cocoon
> properly for production use.  Any help would be appreciated.

The store.memory property apparantly is just a sanity check - it's the
number of bytes that must be free what cocoon starts or else there's a
good chance that we'll run out of memory at some point. I think this is an
ugly hack, myself. Upping the maximum amount of memory allowed for your
JVM should help.

> Okay, so now cocoon is running but when I request .xml documents my web
> server returns the .xml file rather than passing the request to the
> cocoon servlet.  I followed the instructions and added the ApJservAction
> line to jserv.conf.  I saw mention on a message board that Action and
> AddHandler could somehow be used to overcome this problem, but what I
> read didn't give specifics.  I could use any help I can get.  The only
> way I can run cocoon currently is to request (for example)
> http://localhost/servlets/cocoon/somepath/somefile.xml.

in your .htaccess files:

Action cocoonparse /servlets/cocoon
AddHandler cocoonparser .xml

That's what I use. More questions regarding this likely oughta be taken to
the apache-jserv-users list - you'll get faster better answers. :)

- donald