Re: Tomcat stops responding

"Benjamin Papez" <[email protected]> Wed, 21 Feb 2007 18:17:36 +0100
Newsgroups gmane.comp.cms.jahia.install
Message-ID <[email protected]>
Hi Daryl,

2007/2/21, Daryl Gerlach [email protected]:

>
> The client was recently upgraded from 4.0.3 to 4.1.1 however, we did not
> change any of our templates from 4.0.3. So if I understand you correctly
> the *JahiaFieldBaseService.saveFieldDefinition *is probably not being
> called very often.
>

As far as I remember, the field definitions are set on a per template basis.
When a template is used for the first time, the field definitions are saved
to the database, and then only in case there is a change in the field
definition. So if the saveFieldDefinition is called often, you either for
instance have two fields with the same name, which both have a different
definition, so always one overwrites the other and you lose performance and
provoke locks. Another mistake would for instance be, that you have a
dynamic default value, like the current date or the current user, and thus
the field definition will also be changed compared to the saved value in the
database.



> *Questions:*
>
>
> A question about turning on debug for *JahiaFieldDefinitionsRegistry *where
> and how would I do that?
>

In log4j.xml you add

    <category name="org.jahia.registries.JahiaFieldDefinitionsRegistry">
        <priority value="debug"/>
    </category>
This can also be done during runtime without needing to restart the server,
you only need to wait some time until the changeis recognized. You also have
to go sure that if there is a Threshold defined in that file for the Console
or the File output, it should be also DEBUG.
e.g.
<param name="Threshold" value="DEBUG" />

> When is 4.2 going to be available?
>
Don't know yet, but we are on the home stretch.

 We are getting ready to go live with a 5.0.1 site for the same customer any
> day now (it was supposed to be Monday but it has been delayed for a few
> days). Does 5.0.1 have the same issues or has it already been refactored?
>
The code base is quite different in Jahia 5 and most of those synchronized
methods have been refactored. But the field definition setting stayed the
same, so also there it could happen that too many calls to
saveFieldDefinition will cause problems.

 We do have some memory that we could add to the Java heap for this process
> would that help at all?
>
Yes, for sure. Are you using JDK 1.4? Then you should also configure your
garbage collection policy, as the default one is no good.

 We're running MySQL 5.0 on the back end, would increasing the query cache
> be of any help?
>
Not for this particular problem - that could occur also with a larger query
cache, but if it helps to improve your overall performance, go for it.

Regards,
Benjamin