Uploaded image for project: 'PUBLIC - Liferay Sync'
  1. PUBLIC - Liferay Sync
  2. SYNC-1721

Sync client may encounter an out of memory exception when processing updates to large files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Desktop-3.4.1 GA2
    • Fix Version/s: Desktop-3.4.2 GA3
    • Component/s: General
    • Labels:
      None

      Description

      When a large file is updated (> 2Gb), Sync may receive an out of memory exception and become unusable until the program is restarted.

      A message similar to the following will appear in the logs:

      09:33:56.691 DEBUG [pool-11-thread-3] [SyncFileService:555] Out of memory.; SQL statement:
      SELECT * FROM `SyncFile` WHERE (`syncAccountId` = 33 AND `uiEvent` = 7 ) LIMIT 1 [90108-176]
      org.h2.jdbc.JdbcSQLException: Out of memory.; SQL statement:
      SELECT * FROM `SyncFile` WHERE (`syncAccountId` = 33 AND `uiEvent` = 7 ) LIMIT 1 [90108-176]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
      at org.h2.message.DbException.get(DbException.java:167)
      at org.h2.message.DbException.convert(DbException.java:288)
      at org.h2.command.Command.executeQuery(Command.java:207)
      at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:109)
      at com.j256.ormlite.jdbc.JdbcCompiledStatement.runQuery(JdbcCompiledStatement.java:55)
      at com.j256.ormlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:96)
      at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:233)
      at com.j256.ormlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:375)
      at com.j256.ormlite.stmt.Where.queryForFirst(Where.java:517)
      at com.liferay.sync.engine.service.persistence.SyncFilePersistence.fetchByS_U_First(SyncFilePersistence.java:164)
      at com.liferay.sync.engine.service.SyncFileService.hasSyncFiles(SyncFileService.java:544)
      at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.isInProgress(SyncWatchEventProcessor.java:121)
      at com.liferay.sync.engine.SyncEngine$2.doRun(SyncEngine.java:432)
      at com.liferay.sync.engine.SyncEngine$2.run(SyncEngine.java:418)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
      at org.h2.util.StringUtils.getCache(StringUtils.java:65)
      at org.h2.util.StringUtils.cache(StringUtils.java:879)
      at org.h2.value.ValueString.get(ValueString.java:150)
      at org.h2.value.ValueString.get(ValueString.java:135)
      at org.h2.store.Data.readValue(Data.java:883)
      at org.h2.index.PageDataLeaf.readRow(PageDataLeaf.java:626)
      at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:336)
      at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:102)
      at org.h2.index.PageDataCursor.next(PageDataCursor.java:68)
      at org.h2.index.IndexCursor.next(IndexCursor.java:278)
      at org.h2.table.TableFilter.next(TableFilter.java:361)
      at org.h2.command.dml.Select.queryFlat(Select.java:533)
      at org.h2.command.dml.Select.queryWithoutCache(Select.java:646)
      at org.h2.command.dml.Query.query(Query.java:323)
      at org.h2.command.dml.Query.query(Query.java:291)
      at org.h2.command.dml.Query.query(Query.java:37)
      at org.h2.command.CommandContainer.query(CommandContainer.java:91)
      at org.h2.command.Command.executeQuery(Command.java:197)
      at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:109)
      at com.j256.ormlite.jdbc.JdbcCompiledStatement.runQuery(JdbcCompiledStatement.java:55)
      at com.j256.ormlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:96)
      at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:233)
      at com.j256.ormlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:375)
      at com.j256.ormlite.stmt.Where.queryForFirst(Where.java:517)
      at com.liferay.sync.engine.service.persistence.SyncFilePersistence.fetchByS_U_First(SyncFilePersistence.java:164)
      at com.liferay.sync.engine.service.SyncFileService.hasSyncFiles(SyncFileService.java:544)
      at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.isInProgress(SyncWatchEventProcessor.java:121)
      at com.liferay.sync.engine.SyncEngine$2.doRun(SyncEngine.java:432)
      at com.liferay.sync.engine.SyncEngine$2.run(SyncEngine.java:418)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 37 weeks, 3 days ago

                Packages

                Version Package
                Desktop-3.4.2 GA3