You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Edgar Vonk (JIRA)" <ji...@apache.org> on 2009/02/11 17:24:59 UTC

[jira] Created: (JCR-1975) Connection timed out IO Exceptions

Connection timed out IO Exceptions
----------------------------------

                 Key: JCR-1975
                 URL: https://issues.apache.org/jira/browse/JCR-1975
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-api, jackrabbit-core, jackrabbit-jcr-commons, jackrabbit-spi, jackrabbit-spi-commons, jackrabbit-text-extractors
    Affects Versions: core 1.4.5
         Environment: Linux (CentOs), Oracle XE 10g, Tomcat 6, JDK 1.6, Magnolia Enterprise 3.6.3, JNDI
            Reporter: Edgar Vonk


We are running Jackrabbit 1.4.5 as part of the Magnolia Enterprise CMS. We are running into Jackrabbit - database connection problems on some occasions. We do not understand why and when these happen. When they do all we can do is restart Tomcat (with Magnolia) and then everything seems to run fine again until the next time this happens.

We have looked into this issue together with Magnolia but have so far failed to come up with a solution. We have not even been able to reproduce the issue. It only happens on our production environment (where we have the database server on a separate machine from our two app servers).

I have also reported this issue on the Magnolia form: http://www.nabble.com/Using-Oracle-with-a-JNDI-datasource-in-Tomcat-td21114284.html

We are using a JNDI persistence manager set-up. Our Jackrabbit persistence manager configuration looks as follows:

{code}
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
  <param name="driver" value="javax.naming.InitialContext" />
  <param name="url" value="java:comp/env/jdbc/magnolia" />
  <param name="schemaObjectPrefix" value="${wsp.name}_" />
  <param name="externalBLOBs" value="false" />
</PersistenceManager>
{code}

Our datasource in Tomcat:
{code}
	<Resource 
		name="jdbc/magnolia" 
		auth="Container" 
		type="javax.sql.DataSource"
		driverClassName="oracle.jdbc.OracleDriver" 
		url="jdbc:oracle:thin:@//CHANGEME:1521/XEXDB"
		username="CHANGEME" 
		password="CHANGEME" 
		maxActive="20" 
		maxIdle="10" 
		maxWait="-1" />
{code}

In the log files we see:
java.sql.SQLRecoverableException: Io exception: Connection timed out

I will upload the full log file excerpt. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1975) Connection timed out IO Exceptions

Posted by "Edgar Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672671#action_12672671 ] 

Edgar Vonk commented on JCR-1975:
---------------------------------

PS: the Jackrabbit config I posted is not up-to-date anymore because we have switched to 'externalBLOBs = true" a while ago. Apart from this the set-up is still the same.

> Connection timed out IO Exceptions
> ----------------------------------
>
>                 Key: JCR-1975
>                 URL: https://issues.apache.org/jira/browse/JCR-1975
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-api, jackrabbit-core, jackrabbit-jcr-commons, jackrabbit-spi, jackrabbit-spi-commons, jackrabbit-text-extractors
>    Affects Versions: core 1.4.5
>         Environment: Linux (CentOs), Oracle XE 10g, Tomcat 6, JDK 1.6, Magnolia Enterprise 3.6.3, JNDI
>            Reporter: Edgar Vonk
>         Attachments: jackrabbit_ioexceptionlog.txt
>
>
> We are running Jackrabbit 1.4.5 as part of the Magnolia Enterprise CMS. We are running into Jackrabbit - database connection problems on some occasions. We do not understand why and when these happen. When they do all we can do is restart Tomcat (with Magnolia) and then everything seems to run fine again until the next time this happens.
> We have looked into this issue together with Magnolia but have so far failed to come up with a solution. We have not even been able to reproduce the issue. It only happens on our production environment (where we have the database server on a separate machine from our two app servers).
> I have also reported this issue on the Magnolia form: http://www.nabble.com/Using-Oracle-with-a-JNDI-datasource-in-Tomcat-td21114284.html
> We are using a JNDI persistence manager set-up. Our Jackrabbit persistence manager configuration looks as follows:
> {code}
> <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
>   <param name="driver" value="javax.naming.InitialContext" />
>   <param name="url" value="java:comp/env/jdbc/magnolia" />
>   <param name="schemaObjectPrefix" value="${wsp.name}_" />
>   <param name="externalBLOBs" value="false" />
> </PersistenceManager>
> {code}
> Our datasource in Tomcat:
> {code}
> 	<Resource 
> 		name="jdbc/magnolia" 
> 		auth="Container" 
> 		type="javax.sql.DataSource"
> 		driverClassName="oracle.jdbc.OracleDriver" 
> 		url="jdbc:oracle:thin:@//CHANGEME:1521/XEXDB"
> 		username="CHANGEME" 
> 		password="CHANGEME" 
> 		maxActive="20" 
> 		maxIdle="10" 
> 		maxWait="-1" />
> {code}
> In the log files we see:
> java.sql.SQLRecoverableException: Io exception: Connection timed out
> I will upload the full log file excerpt. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1975) Connection timed out IO Exceptions

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1975:
-------------------------------

    Component/s:     (was: jackrabbit-text-extractors)
                     (was: jackrabbit-spi-commons)
                     (was: jackrabbit-jcr-commons)
                     (was: jackrabbit-spi)
                     (was: jackrabbit-api)

It looks like your database connections are simply timing out. You might want to check with your DBA on the timeout settings of your Oracle database.

Anyway, Jackrabbit should be able to deal with such issues by automatically reconnecting to the database, but it may be that the connection pool you have configured in JNDI is preventing Jackrabbit from doing this. You might want to try specifying the database connection parameters directly in Jackrabbit (workspace) configuration.

> Connection timed out IO Exceptions
> ----------------------------------
>
>                 Key: JCR-1975
>                 URL: https://issues.apache.org/jira/browse/JCR-1975
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.5
>         Environment: Linux (CentOs), Oracle XE 10g, Tomcat 6, JDK 1.6, Magnolia Enterprise 3.6.3, JNDI
>            Reporter: Edgar Vonk
>         Attachments: jackrabbit_ioexceptionlog.txt
>
>
> We are running Jackrabbit 1.4.5 as part of the Magnolia Enterprise CMS. We are running into Jackrabbit - database connection problems on some occasions. We do not understand why and when these happen. When they do all we can do is restart Tomcat (with Magnolia) and then everything seems to run fine again until the next time this happens.
> We have looked into this issue together with Magnolia but have so far failed to come up with a solution. We have not even been able to reproduce the issue. It only happens on our production environment (where we have the database server on a separate machine from our two app servers).
> I have also reported this issue on the Magnolia form: http://www.nabble.com/Using-Oracle-with-a-JNDI-datasource-in-Tomcat-td21114284.html
> We are using a JNDI persistence manager set-up. Our Jackrabbit persistence manager configuration looks as follows:
> {code}
> <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
>   <param name="driver" value="javax.naming.InitialContext" />
>   <param name="url" value="java:comp/env/jdbc/magnolia" />
>   <param name="schemaObjectPrefix" value="${wsp.name}_" />
>   <param name="externalBLOBs" value="false" />
> </PersistenceManager>
> {code}
> Our datasource in Tomcat:
> {code}
> 	<Resource 
> 		name="jdbc/magnolia" 
> 		auth="Container" 
> 		type="javax.sql.DataSource"
> 		driverClassName="oracle.jdbc.OracleDriver" 
> 		url="jdbc:oracle:thin:@//CHANGEME:1521/XEXDB"
> 		username="CHANGEME" 
> 		password="CHANGEME" 
> 		maxActive="20" 
> 		maxIdle="10" 
> 		maxWait="-1" />
> {code}
> In the log files we see:
> java.sql.SQLRecoverableException: Io exception: Connection timed out
> I will upload the full log file excerpt. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1975) Connection timed out IO Exceptions

Posted by "Edgar Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edgar Vonk updated JCR-1975:
----------------------------

    Attachment: jackrabbit_ioexceptionlog.txt

Attached the excerpt of the Tomcat log file when the problem occurs.

> Connection timed out IO Exceptions
> ----------------------------------
>
>                 Key: JCR-1975
>                 URL: https://issues.apache.org/jira/browse/JCR-1975
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-api, jackrabbit-core, jackrabbit-jcr-commons, jackrabbit-spi, jackrabbit-spi-commons, jackrabbit-text-extractors
>    Affects Versions: core 1.4.5
>         Environment: Linux (CentOs), Oracle XE 10g, Tomcat 6, JDK 1.6, Magnolia Enterprise 3.6.3, JNDI
>            Reporter: Edgar Vonk
>         Attachments: jackrabbit_ioexceptionlog.txt
>
>
> We are running Jackrabbit 1.4.5 as part of the Magnolia Enterprise CMS. We are running into Jackrabbit - database connection problems on some occasions. We do not understand why and when these happen. When they do all we can do is restart Tomcat (with Magnolia) and then everything seems to run fine again until the next time this happens.
> We have looked into this issue together with Magnolia but have so far failed to come up with a solution. We have not even been able to reproduce the issue. It only happens on our production environment (where we have the database server on a separate machine from our two app servers).
> I have also reported this issue on the Magnolia form: http://www.nabble.com/Using-Oracle-with-a-JNDI-datasource-in-Tomcat-td21114284.html
> We are using a JNDI persistence manager set-up. Our Jackrabbit persistence manager configuration looks as follows:
> {code}
> <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
>   <param name="driver" value="javax.naming.InitialContext" />
>   <param name="url" value="java:comp/env/jdbc/magnolia" />
>   <param name="schemaObjectPrefix" value="${wsp.name}_" />
>   <param name="externalBLOBs" value="false" />
> </PersistenceManager>
> {code}
> Our datasource in Tomcat:
> {code}
> 	<Resource 
> 		name="jdbc/magnolia" 
> 		auth="Container" 
> 		type="javax.sql.DataSource"
> 		driverClassName="oracle.jdbc.OracleDriver" 
> 		url="jdbc:oracle:thin:@//CHANGEME:1521/XEXDB"
> 		username="CHANGEME" 
> 		password="CHANGEME" 
> 		maxActive="20" 
> 		maxIdle="10" 
> 		maxWait="-1" />
> {code}
> In the log files we see:
> java.sql.SQLRecoverableException: Io exception: Connection timed out
> I will upload the full log file excerpt. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1975) Connection timed out IO Exceptions

Posted by "Edgar Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674668#action_12674668 ] 

Edgar Vonk commented on JCR-1975:
---------------------------------

Thanks Jukka. 

Is the automatic reconnect done by Jackrabbit or is it handled by the connection pool? I was looking at http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures and it seems that you need to add a 'validationQuery' parameter to the datasource in order to get this to work? 

Adding the database connection parameters in the workspace configurations is problematic because they are generated by Magnolia and there are quite a lot of them. Also, it would make maintenance of our environments hard because we have different databases for every Magnolia server in our hosting infrastructure. I was wondering why you think that adding the database connection parameters in the workspace.xml's would make a difference in this case?

I do have a feeling that this whole issue is somehow caused by the usage of JNDI but I am not sure how..

> Connection timed out IO Exceptions
> ----------------------------------
>
>                 Key: JCR-1975
>                 URL: https://issues.apache.org/jira/browse/JCR-1975
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.5
>         Environment: Linux (CentOs), Oracle XE 10g, Tomcat 6, JDK 1.6, Magnolia Enterprise 3.6.3, JNDI
>            Reporter: Edgar Vonk
>         Attachments: jackrabbit_ioexceptionlog.txt
>
>
> We are running Jackrabbit 1.4.5 as part of the Magnolia Enterprise CMS. We are running into Jackrabbit - database connection problems on some occasions. We do not understand why and when these happen. When they do all we can do is restart Tomcat (with Magnolia) and then everything seems to run fine again until the next time this happens.
> We have looked into this issue together with Magnolia but have so far failed to come up with a solution. We have not even been able to reproduce the issue. It only happens on our production environment (where we have the database server on a separate machine from our two app servers).
> I have also reported this issue on the Magnolia form: http://www.nabble.com/Using-Oracle-with-a-JNDI-datasource-in-Tomcat-td21114284.html
> We are using a JNDI persistence manager set-up. Our Jackrabbit persistence manager configuration looks as follows:
> {code}
> <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
>   <param name="driver" value="javax.naming.InitialContext" />
>   <param name="url" value="java:comp/env/jdbc/magnolia" />
>   <param name="schemaObjectPrefix" value="${wsp.name}_" />
>   <param name="externalBLOBs" value="false" />
> </PersistenceManager>
> {code}
> Our datasource in Tomcat:
> {code}
> 	<Resource 
> 		name="jdbc/magnolia" 
> 		auth="Container" 
> 		type="javax.sql.DataSource"
> 		driverClassName="oracle.jdbc.OracleDriver" 
> 		url="jdbc:oracle:thin:@//CHANGEME:1521/XEXDB"
> 		username="CHANGEME" 
> 		password="CHANGEME" 
> 		maxActive="20" 
> 		maxIdle="10" 
> 		maxWait="-1" />
> {code}
> In the log files we see:
> java.sql.SQLRecoverableException: Io exception: Connection timed out
> I will upload the full log file excerpt. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.