Page is not saved Intermittently and Content Loss Due to Database Scheduled Maintenance Plan

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Intermittently, saving a page fails and causes the modification to be lost. When the issue occurs, there is no draft available.

The following appears in the atlassian-confluence.log

2014-10-30 12:10:09,073 WARN [http-443-19] [confluence.velocity.introspection.AnnotationBoxingUberspect] lookupMethod Velocity template accessing deprecated method com.atlassian.confluence.pages.DefaultDraftManager#getMergedContent - /users/viewmydrafts.vm[line 70, column 68]
 -- url: /users/viewmydrafts.action | userName: tester | referer: https://my.base.url/pages/viewpage.action?pageId=36050615 | action: viewmydrafts
2015-01-10 03:07:29,165 ERROR [AtlassianEvent::CustomizableThreadFactory-1] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.confluence.plugins.createcontent.listeners.PluginEnabledListener$AsyncPluginEnabledEvent@10f2320f' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.createcontent.listeners.PluginEnabledListener.onAsyncBlueprintCreateEvent(com.atlassian.confluence.plugins.createcontent.listeners.PluginEnabledListener$AsyncPluginEnabledEvent), listener=com.atlassian.confluence.plugins.createcontent.listeners.PluginEnabledListener@77cb4a71}'.
java.lang.RuntimeException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
2015-01-18 13:50:23,367 WARN [http-443-7] [persistence.dao.hibernate.HibernateDraftDao] getDraft Found 2 drafts for pageId = 0 creator = 'com.atlassian.confluence.user.ConfluenceUserImpl@55d987e2[tester,11ba167048b0e8630148cffdcfd70004]' draftType = 'page'
 -- url: /pages/createpage-entervariables.action | userName: tester | referer: https://my.base.url/display/KEY/My+Page?src=contextnavpagetreemode | action: createpage-entervariables

Diagnosis

Environment

An issue was found on the following platforms:

  • Database: Microsoft SQL Server 2008 R2 (10.50.4033)
  • Application Server's OS: Windows Server 2008 R2 6.1
  • Application Server: Apache Tomcat/6.0.35
  • Confluence 5.2.5

Diagnostic Steps

  • Ensure that there's no files modified/removed in the instance
  • Database needs to be configured according to Confluence Database Setup Documentation (Database Configuration) - e.g: Isolation Level, Character Set, Collation
  • Ensure there's no timeout in App Server layer affecting this (remove the disableUploadTimeout="true" parameter in server.xml)
  • Check the Catalina log during the time issue happened. The following trace could be seen:

    feb 01, 2015 8:23:16 AM org.apache.catalina.core.StandardHostValve custom
    SEVERE: Exception Processing ErrorPage[errorCode=500, lcoation=/500page.jsp]
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
    	at org.springframework.orm.hibernate.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:473)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
    	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  • Check the Database server log to look at the timestamp

Cause

After applying the Resolution and observing the instance for about 2 weeks, the frequency of issue occurrences starts to get lower until it completely disappears.

Resolution

Turn off the maintenance plan in SQL Server Database.

Note: This solution was confirmed after several tests and observation. If you need assistance, please contact Atlassian Support to get help with the troubleshooting.

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.