简体   繁体   English

Cloud Foundry 数据源超时 oracle JDBC 为什么?

[英]Cloud foundry datasource timeout oracle JDBC why?

I have a cloud setup in Pivotal and i have Database connection pool but the request for database gets timed out .我在Pivotal 中有一个云设置,我有数据库连接池,但对数据库的请求超时 I have used cloudfoundry to setup the connection using spring boot .我使用cloudfoundry使用spring boot设置连接。

What are the things i should look for in code to trace the problem ?我应该在代码中寻找什么来追踪问题

"Database Connection Pool"? “数据库连接池”? What do you mean by it?你是什​​么意思? Did you create one?你创造了一个吗? How did you inject it in the PaaS?你是如何将它注入到 PaaS 中的?

In PCF, you create a user-provided-service (CUPS) for databases outside of the PCF.在 PCF 中,您可以为 PCF 之外的数据库创建用户提供的服务 (CUPS)。 You will have to create a service instance of the CUPS and bind it to your app.您必须创建 CUPS 的服务实例并将其绑定到您的应用程序。

The PaaS manage the rest of the details. PaaS 管理其余的细节。 In your app define a datasource, which will be injected by the PaaS into your App at runtime.在您的应用程序中定义一个数据源,它将在运行时由 PaaS 注入到您的应用程序中。

Look at the Spring Music app and its documentation on how to use Spring Boot app with a database.查看 Spring Music 应用程序及其有关如何将 Spring Boot 应用程序与数据库一起使用的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM