Unable to upgrade plugins due to Length of LOB data in SQL server
Symptoms
Upgrading plugins causes the following error: An unexpected error occurred. Please refer to the logs for more information
The following appears in the atlassian-confluence.log
:
Caused by: net.sf.hibernate.exception.GenericJDBCException: could not update: [com.atlassian.confluence.plugin.persistence.PluginData#10190858]
at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:80)
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:681)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:621)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2464)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2450)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2408)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2276)
at com.atlassian.confluence.plugin.persistence.hibernate.HibernatePluginDataDao.saveOrUpdate(HibernatePluginDataDao.java:60)
... 114 more
Caused by: java.sql.SQLException: Length of LOB data (105082) to be replicated exceeds configured maximum 65536. Use the stored procedure sp_configure to increase the configured maximum value for max text repl size option, which defaults to 65536. A configured value of -1 indicates no limit, other that the limit imposed by the data type.
Cause
This is a limitation of MSSQL server Max text exceeding the configured maximum 65536 characters.
Resolution
Increase the size that can be replicated. This is applicable for transactional replication only.
Recommended the hands on from a DBA to perform the following
T-SQL:
EXEC sp_configure ‘max text repl size’, 2147483647
SSMS (excerpt from BOL):
- In Object Explorer, right-click a server and select Properties.
- Click the Advanced node.
- Under Miscellaneous, change the Max Text Replication Size option to the desired value.
More details can be found in these articles: