Tôi có một ứng dụng grails chạy thành công trong cloudfoundry với H2 làm cơ sở dữ liệu. Bây giờ tôi muốn chuyển sang postgresql. Mọi thứ hoạt động như mong đợi khi tôi chạy ứng dụng cục bộ đối với postgreSQL.PostgreSQL trên cloudfoundry ném PSQLException: FATAL: chấm dứt kết nối do lệnh quản trị
Trên trường hợp đám mây, tôi nhận được một ngoại lệ trong một phân tích chạy khá dài, mà tôi thực hiện như một tác vụ nền (sử dụng plugin thực thi grails). Trong nhiệm vụ không đồng bộ này
def future = executorService.submit({
return analysisService.analyzeProject(model, project)
})
tôi nhận được ngoại lệ sau đây từ các cơ sở dữ liệu:
2012-11-26 10:27:38,319 [pool-2-thread-1] ERROR interceptor.TransactionInterceptor - Application exception overridden by rollback exception
org.springframework.dao.DataAccessResourceFailureException: Hibernate operation: could not execute query; SQL [select this_.id as id8_0_, this_.version as version8_0_, this_.language as language8_0_, this_.url as url8_0_ from sonar_adapter_configuration this_]; FATAL: terminating connection due to administrator command; nested exception is org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command
at myapp.adapters.sonar.SonarAdapterService.loadSonarConfig(SonarAdapterService.groovy:184)
at myapp.adapters.sonar.SonarAdapterService.determineArtefactSizes(SonarAdapterService.groovy:145)
at myapp.project.AnalysisService.analyzeProject(AnalysisService.groovy:46)
at myapp.project.ProjectController$_analyzeProject_closure2.doCall(ProjectController.groovy:69)
at grails.plugin.executor.PersistenceContextRunnableWrapper$_run_closure1.doCall(PersistenceContextRunnableWrapper.groovy:34)
at grails.plugin.executor.PersistenceContextWrapper.wrap(PersistenceContextWrapper.groovy:35)
at grails.plugin.executor.PersistenceContextRunnableWrapper.run(PersistenceContextRunnableWrapper.groovy:34)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
... 13 more
Bất cứ ý tưởng gì có thể gây ra điều này?
bạn không cần phải bao gồm chữ ký trong bài viết của bạn - thẻ sử dụng của bạn là được thêm tự động. Đọc [FAQ] (http://stackoverflow.com/faq#signatures) để biết thêm chi tiết. – Artemix