Backendless Support
 
Not Covered by Support

Standalone hangs when custom server code is deployed

Our standalone installation hangs new minutes after deploying java code.

Java code consits of Timer and Data handler.

I followed every documentation to implement it, I watched all videos and I installed the standalone using guides. I dont feel buying paid support is what you should be asking me to do.

These errors repeat in logs:

  1. 08:31:26.130 [DEBUG] DbConnectionMonitoring - Connection 'baff6993-f560-41fe-aba6-6c6ddc090c8f' was not released in time, for DB: null
  2. java.lang.Thread.getStackTrace(Thread.java:1552)
  3. com.backendless.db.connection.MonitoredConnection.<init>(MonitoredConnection.java:36)
  4. com.backendless.db.connection.factory.MonitoringConnectionFactory.getConnection(MonitoringConnectionFactory.java:26)
  5. com.backendless.db.connection.pool.DbCpConnectionPool.getConnection(DbCpConnectionPool.java:35)
  6. com.backendless.util.db.DbcpConnectionProviderImpl.getConnection(DbcpConnectionProviderImpl.java:55)
  7. com.backendless.util.db.MultiTenantConnectionProviderImpl.getAnyConnection(MultiTenantConnectionProviderImpl.java:27)
  8. com.backendless.util.db.MultiTenantConnectionProviderImpl.getConnection(MultiTenantConnectionProviderImpl.java:41)
  9. org.hibernate.internal.AbstractSessionImpl$ContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:429)
  10. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:84)
  11. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:109)
  12. org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:47)
  13. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:146)
  14. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172)
  15. org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:148)
  16. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1927)
  17. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1896)
  18. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1874)
  19. org.hibernate.loader.Loader.doQuery(Loader.java:919)
  20. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
  21. org.hibernate.loader.Loader.doList(Loader.java:2610)
  22. org.hibernate.loader.Loader.doList(Loader.java:2593)
  23. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2422)
  24. org.hibernate.loader.Loader.list(Loader.java:2417)
  25. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
  26. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
  27. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
  28. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1339)
  29. org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
  30. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
  31. org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:529)
  32. com.backendless.datamodel.application.dao.AppVersionDao.findBy(AppVersionDao.java:26)
  33. com.backendless.servercode.codeModel.ModelCodeExtender.getAppVersion(ModelCodeExtender.java:131)
  34. com.backendless.servercode.codeModel.ModelCodeExtender.getContext(ModelCodeExtender.java:82)
  35. com.backendless.services.persistence.common.CustomLogicDecorator.find(CustomLogicDecorator.java:164)
  36. com.backendless.services.persistence.common.CustomLogicDecorator.find(CustomLogicDecorator.java:29)
  37. com.backendless.services.persistence.common.PersistenceInterfaceAdapter.find(PersistenceInterfaceAdapter.java:102)
  38. com.backendless.logging.LogService.getLoggers(LogService.java:403)
  39. com.backendless.logging.LogService.getLogConfig(LogService.java:95)
  40. com.backendless.logging.LogService.access$000(LogService.java:43)
  41. com.backendless.logging.LogService$3$1.apply(LogService.java:327)
  42. com.backendless.logging.LogService$3$1.apply(LogService.java:323)
  43. com.backendless.util.SyncUtil.execute(SyncUtil.java:93)
  44. com.backendless.util.SyncUtil.execute(SyncUtil.java:60)
  45. com.backendless.logging.LogService$3.run(LogService.java:322)
  46. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  47. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  48. java.lang.Thread.run(Thread.java:745)
  49. 08:33:27.128 [ERROR] backendless - main_application --- Lock was not released after 120 seconds, lock key is bckls_sync_key_59C562F3-C052-DCE2-FF20-41CBA2F5E300v1LogConfig59C562F3-C052-DCE2-FF20-41CBA2F5E300, applicationId is 59C562F3-C052-DCE2-FF20-41CBA2F5E300
  50. 08:33:27.133 [ERROR] backendless - 59C562F3-C052-DCE2-FF20-41CBA2F5E300 --- java.lang.InterruptedException
  51. java.lang.RuntimeException: java.lang.InterruptedException
  52. at com.backendless.db.connection.ApplicationConnection.create(ApplicationConnection.java:22)
  53. at com.backendless.db.connection.pool.ApplicationPool.get(ApplicationPool.java:21)
  54. at com.backendless.db.connection.pool.WrappedConnectionPool.getConnection(WrappedConnectionPool.java:23)
  55. at com.backendless.db.connection.factory.MonitoringConnectionFactory.getConnection(MonitoringConnectionFactory.java:25)
  56. at com.backendless.db.connection.pool.DbCpConnectionPool.getConnection(DbCpConnectionPool.java:35)
  57. at com.backendless.util.db.DbcpConnectionProviderImpl.getConnection(DbcpConnectionProviderImpl.java:55)
  58. at com.backendless.util.db.MultiTenantConnectionProviderImpl.getAnyConnection(MultiTenantConnectionProviderImpl.java:27)
  59. at com.backendless.util.db.MultiTenantConnectionProviderImpl.getConnection(MultiTenantConnectionProviderImpl.java:41)
  60. at org.hibernate.internal.AbstractSessionImpl$ContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:429)
  61. at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:84)
  62. at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:109)
  63. at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:47)
  64. at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:146)
  65. at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172)
  66. at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:148)
  67. at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1927)
  68. at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1896)
  69. at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1874)
  70. at org.hibernate.loader.Loader.doQuery(Loader.java:919)
  71. at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
  72. at org.hibernate.loader.Loader.doList(Loader.java:2610)
  73. at org.hibernate.loader.Loader.doList(Loader.java:2593)
  74. at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2422)
  75. at org.hibernate.loader.Loader.list(Loader.java:2417)
  76. at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
  77. at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
  78. at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
  79. at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1339)
  80. at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
  81. at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
  82. at org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:529)
  83. at com.backendless.datamodel.application.dao.AppVersionDao.findBy(AppVersionDao.java:26)
  84. at com.backendless.servercode.codeModel.ModelCodeExtender.getAppVersion(ModelCodeExtender.java:131)
  85. at com.backendless.servercode.codeModel.ModelCodeExtender.getContext(ModelCodeExtender.java:82)
  86. at com.backendless.services.persistence.common.CustomLogicDecorator.find(CustomLogicDecorator.java:164)
  87. at com.backendless.services.persistence.common.CustomLogicDecorator.find(CustomLogicDecorator.java:29)
  88. at com.backendless.services.persistence.common.PersistenceInterfaceAdapter.find(PersistenceInterfaceAdapter.java:102)
  89. at com.backendless.logging.LogService.getLoggers(LogService.java:403)
  90. at com.backendless.logging.LogService.getLogConfig(LogService.java:95)
  91. at com.backendless.logging.LogService.access$000(LogService.java:43)
  92. at com.backendless.logging.LogService$3$1.apply(LogService.java:327)
  93. at com.backendless.logging.LogService$3$1.apply(LogService.java:323)
  94. at com.backendless.util.SyncUtil.execute(SyncUtil.java:93)
  95. at com.backendless.util.SyncUtil.execute(SyncUtil.java:60)
  96. at com.backendless.logging.LogService$3.run(LogService.java:322)
  97. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  98. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  99. Caused by: java.lang.InterruptedException: null
  100. at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998)
  101. at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
  102. at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
  103. at com.backendless.db.connection.ApplicationConnection.create(ApplicationConnection.java:18)
  104. ... 47 common frames omitted

Leave a Comment

Comments (3)

photo
1

Does the same BL code work on ONLINE service?

photo
1

Yes it does. It also works in debug mode.

photo
1

It is very hard to say what is the problem. It may be because java code runner on server is turned off, or has wrong configuration. I would able to connect to your server through SSH, and figure out what is a problem, if you buy payment support. Please contact sales@backendless.com to get more details.