Spring启动应用程序中的Oracle套接字读取超时错误

时间:2016-10-25 06:31:46

标签: java spring oracle jdbc

我创建了一个spring boot应用程序。当我在数据库服务器上的加载开始增加后加载应用程序时,我开始套接字读取超时错误。

2016-10-24 21:56:10 [pool-3-thread-296] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - IO Error: Socket read timed out
2016-10-24 21:56:10 [pool-3-thread-296] ERROR 
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection

以下是Springboot应用程序的属性文件详细信息

spring.datasource.url=jdbc:oracle:thin:@<ip>:1521:<dbname>
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.initial-size=100
spring.datasource.maxActive=1500
spring.datasource.validationQuery=select 1 from dual
spring.jpa.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
spring.jpa.show-sql = true
spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy

spring.datasource.pool-prepared-statements=true
spring.datasource.pool-prepared-statements-cache-size=500
spring.datasource.max-open-prepared-statements=500

由于错误非常通用,我无法弄清楚为什么我会收到套接字读取超时异常。 我还需要知道“[pool-3-thread-296]”在异常日志中的含义是什么?

1 个答案:

答案 0 :(得分:-2)