pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SocketTimeout and ConnectionTimeout
7+ messages / 3 participants
[nested] [flat]

* SocketTimeout and ConnectionTimeout
@ 2016-08-25 11:22 Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-25 17:03 ` Re: SocketTimeout and ConnectionTimeout Dave Cramer <pg@fastcrypt.com>
  2016-08-30 15:23 ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Alexandre Brito @ 2016-08-25 11:22 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

 

We are facing a problem with the JBDC connection being drop silently and the
driver is not throwing a SQL Exception in a timely manner. 

Going through the mailing-list and the internet, it seems the problem is not
so rare however the solution is still out of my reach.

 

What is happening is simple:

1.       JDBC connection is open and then stays idle

2.       A network component (Fortinet)  beyond our control seems to be
dropping idle TCP connections.

3.       Our webapp places a query and it takes 1min and 12 seconds (more or
less) for the SQL Exception to be caught. 

 

We've reproduced the issue behaviour (on our environment ) by setting an
iptables rule blocking port 5432 after the DB connection was successfully
established. On the logs I can see the socket read (I think) timeout is
around 12 seconds and then there are 6 retries 10 secs apart.  (see the
extracted log file from tomcat attached with EL log to finest) 

 

I would like to have control over the number of retries and timeout.
Basically, I would like the receive an SQL Connection Timeout Exception
within 5-10 seconds. 

 

We are using tomcat 8 and latest JDCB driver (9.4.1209 JDBC42) and JPA.

 

Our schema is tiny and the data in it very very small. 

 

This is my tomcat's context.xml (for troubleshooting proposes) . 

 

<Resource auth="Container"

   driverClassName="org.postgresql.Driver"

   maxTotal="1"

   maxIdle="1"

   maxWaitMillis="3000"

   name="jdbc/postgresqlconnection"

   type="javax.sql.DataSource"

   url="jdbc:postgresql://127.0.0.1:5432/onbbp?
connectionTimeout=2&amp;socketTimeout=2"

   factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"

   username="user"

   password="pass"

/> 

 

This is my apps's persistence.xml

 

<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";

             version="2.0" xmlns="http://java.sun.com/xml/ns/persistence";

    <persistence-unit name="bp-persistence"
transaction-type="RESOURCE_LOCAL">

        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

 
<non-jta-data-source>java:comp/env/jdbc/postgresqlconnection</non-jta-data-s
ource>

        <class>com.all.onbbp.database.entities.BpUser</class>

        <class>com. all.onbbp.database.entities.BusinessPartner</class>

        <class>com. all.onbbp.database.entities.Enterprise</class>

        <class>com. all.onbbp.database.entities.Property</class>

        <class>com. all.onbbp.database.entities.LokiCookie</class>

        <class>com. all.onbbp.database.entities.Report</class>

        <class>com. all.onbbp.database.entities.Languages</class>

        <class>com. all.onbbp.database.entities.EmailTemplates</class>

        <class>com. all.onbbp.database.entities.BpMutex</class>

        <class>com. all.onbbp.database.entities.UserSession</class>

        <shared-cache-mode>NONE</shared-cache-mode>

        <properties>

                <property name="javax.persistence.validation.mode"
value="AUTO" />

                <property name="eclipselink.logging.level" value="FINEST"/>

        </properties>

    </persistence-unit>

</persistence>

                

Btw the, this is how the EntityManager is initialized

 

public class StartupListener implements ServletContextListener {

 

    .

    private static EntityManagerFactory entityManagerFactory;

 

    @Override

    public void contextInitialized(ServletContextEvent sce) {

        try {

            try {

                entityManagerFactory =
Persistence.createEntityManagerFactory("bp-persistence");

            } catch (Throwable ex) {

                throw new
BPException(BPErrorCode.INTERNAL_SERVER_ERROR_DB_ERROR);

            }

 

Does anyone has an idea? Why does the connectionTimeout to the database take
so long to return (more than 12 seconds)? 

 

Many thanks in advance for any reply

Alexandre 

 

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Attachments:

connectioTimeout_takes_too_long.txt (text/plain, 24.5K) download #... IPTABLES FLUSH .... EL Fine]: connection: 2016-08-25 12:04:38.689--Thread(Thread[localhost-startStop-1,5,main])--Detected database platform: org.eclipse.persistence.platform.database.PostgreSQLPlatform [EL Config]: connection: 2016-08-25 12:04:38.709--ServerSession(914063279)--Connection(618694891)--Thread(Thread[localhost-startStop-1,5,main])--connecting(DatabaseLogin( platform=>PostgreSQLPlatform user name=> "" connector=>JNDIConnector datasource name=>java:comp/env/jdbc/postgresqlconnection )) [EL Config]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)--Connection(1752457075)--Thread(Thread[localhost-startStop-1,5,main])--Connected: jdbc:postgresql://127.0.0.1:5432/onbbp?connectionTimeout=2&socketTimeout=3 User: onbbp Database: PostgreSQL Version: 9.2.14 Driver: PostgreSQL Native Driver Version: PostgreSQL 9.4.1209 [EL Finest]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)--Connection(592395403)--Thread(Thread[localhost-startStop-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)--Connection(592395403)--Thread(Thread[localhost-startStop-1,5,main])--Connection released to connection pool [read]. [EL Config]: connection: 2016-08-25 12:04:38.712--ServerSession(914063279)--Connection(1339180815)--Thread(Thread[localhost-startStop-1,5,main])--connecting(DatabaseLogin( platform=>PostgreSQLPlatform user name=> "" connector=>JNDIConnector datasource name=>java:comp/env/jdbc/postgresqlconnection )) [EL Config]: connection: 2016-08-25 12:04:38.724--ServerSession(914063279)--Connection(1876240846)--Thread(Thread[localhost-startStop-1,5,main])--Connected: jdbc:postgresql://127.0.0.1:5432/onbbp?connectionTimeout=2&socketTimeout=3 User: onbbp Database: PostgreSQL Version: 9.2.14 Driver: PostgreSQL Native Driver Version: PostgreSQL 9.4.1209 [EL Finest]: sequencing: 2016-08-25 12:04:38.728--ServerSession(914063279)--Thread(Thread[localhost-startStop-1,5,main])--sequencing connected, state is Preallocation_NoTransaction_State [EL Finest]: sequencing: 2016-08-25 12:04:38.728--ServerSession(914063279)--Thread(Thread[localhost-startStop-1,5,main])--sequence report_id_seq: preallocation size 1 ... ... #... IPTABLES RULE ADDED BLOCKING 5432 PORT 25-Aug-2016 12:06:25.631 INFO [http-nio-8081-exec-1] org.apache.tomcat.util.http.LegacyCookieProcessor.processCookieHeader Cookies: Invalid cookie. Value not a token or quoted value Note: further occurrences of Cookie errors will be logged at DEBUG level. [EL Finer]: connection: 2016-08-25 12:06:26.447--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--client acquired: 1265055413 [EL Finer]: transaction: 2016-08-25 12:06:26.447--ClientSession(1265055413)--Thread(Thread[http-nio-8081-exec-1,5,main])--acquire unit of work: 1459091163 [EL Finest]: query: 2016-08-25 12:06:26.449--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Execute query ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)") [EL Finest]: connection: 2016-08-25 12:06:26.449--ServerSession(914063279)--Connection(1113910109)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:26.449--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external connection pool [EL Finest]: connection: 2016-08-25 12:06:39.461--ServerSession(914063279)--Connection(1113910109)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection released to connection pool [read]. [EL Info]: 2016-08-25 12:06:39.461--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)"). [EL Finest]: connection: 2016-08-25 12:06:39.466--ServerSession(914063279)--Connection(871128930)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:39.466--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external connection pool [EL Finest]: connection: 2016-08-25 12:06:49.478--ServerSession(914063279)--Connection(871128930)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection released to connection pool [read]. [EL Info]: 2016-08-25 12:06:49.478--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)"). [EL Finest]: connection: 2016-08-25 12:06:54.479--ServerSession(914063279)--Connection(1018598475)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:54.479--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external connection pool [EL Finest]: connection: 2016-08-25 12:07:04.49--ServerSession(914063279)--Connection(1018598475)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection released to connection pool [read]. [EL Info]: 2016-08-25 12:07:04.49--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)"). [EL Finest]: connection: 2016-08-25 12:07:09.491--ServerSession(914063279)--Connection(1798979254)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:07:09.491--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external connection pool [EL Finest]: connection: 2016-08-25 12:07:19.501--ServerSession(914063279)--Connection(1798979254)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection released to connection pool [read]. [EL Info]: 2016-08-25 12:07:19.502--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)"). [EL Finest]: connection: 2016-08-25 12:07:24.502--ServerSession(914063279)--Connection(241140994)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:07:24.503--ServerSession(914063279)--Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external connection pool [EL Finest]: connection: 2016-08-25 12:07:34.514--ServerSession(914063279)--Connection(241140994)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connection released to connection pool [read]. [EL Info]: 2016-08-25 12:07:34.514--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)"). [EL Warning]: 2016-08-25 12:07:34.514--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attempt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?) bind => [user] Query: ReadObjectQuery(name="readBpUser" referenceClass=BpUser sql="SELECT email, admin, failed_login_attempts, first_name, last_name, last_passwords, login_unlock_time, password, password_creation, pw_reset_link, pw_reset_link_creation, register_link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (email = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1619) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:248) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:714) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2777) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2730) at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:526) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114) at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:429) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:883) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:826) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:719) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:588) at com.vodafone.onbbp.database.dao.impl.BpUserDaoImpl.getById(BpUserDaoImpl.java:114) at com.vodafone.onbbp.rest.resources.LoginResource.loginBpUser(LoginResource.java:121) at com.vodafone.onbbp.rest.resources.LoginResource.loginUser(LoginResource.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:280) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:67) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:212) at org.postgresql.Driver.makeConnection(Driver.java:407) at org.postgresql.Driver.connect(Driver.java:275) at org.apache.tomcat.dbcp.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:255) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:867) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:432) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360) at org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:133) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) ... 96 more Caused by: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.postgresql.core.PGStream.<init>(PGStream.java:64) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150) ... 108 more [EL Finer]: transaction: 2016-08-25 12:07:34.534--UnitOfWork(1459091163)--Thread(Thread[http-nio-8081-exec-1,5,main])--release unit of work [EL Finer]: connection: 2016-08-25 12:07:34.534--ClientSession(1265055413)--Thread(Thread[http-nio-8081-exec-1,5,main])--client released
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
@ 2016-08-25 17:03 ` Dave Cramer <pg@fastcrypt.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Dave Cramer @ 2016-08-25 17:03 UTC (permalink / raw)
  To: Alexandre Brito <alexandre.brito@wit-software.com>; +Cc: pgsql-jdbc

We don't see the connection timeout until the O/S times out which can be a
while.

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 25 August 2016 at 07:22, Alexandre Brito <
alexandre.brito@wit-software.com> wrote:

> Hi,
>
>
>
> We are facing a problem with the JBDC connection being drop silently and
> the driver is not throwing a SQL Exception in a timely manner.
>
> Going through the mailing-list and the internet, it seems the problem is
> not so rare however the solution is still out of my reach.
>
>
>
> What is happening is simple:
>
> 1.       JDBC connection is open and then stays idle
>
> 2.       A network component (Fortinet)  beyond our control seems to be
> dropping idle TCP connections.
>
> 3.       Our webapp places a query and it takes 1min and 12 seconds (more
> or less) for the SQL Exception to be caught.
>
>
>
> We’ve reproduced the issue behaviour (on our environment ) by setting an
> iptables rule blocking port 5432 after the DB connection was successfully
> established. On the logs I can see the socket read (I think) timeout is
> around *12 seconds* and then there are *6 retries* *10 secs* apart.  (see
> the extracted log file from tomcat attached with EL log to finest)
>
>
>
> I would like to have control over the number of retries and timeout.
> Basically, I would like the receive an SQL Connection Timeout Exception
> within 5-10 seconds.
>
>
>
> We are using tomcat 8 and latest JDCB driver (9.4.1209 JDBC42) and JPA.
>
>
>
> Our schema is tiny and the data in it very very small.
>
>
>
> This is my tomcat’s context.xml (for troubleshooting proposes) .
>
>
>
> <Resource auth="Container"
>
>    driverClassName="org.postgresql.Driver"
>
>    maxTotal="1"
>
>    maxIdle="1"
>
>    maxWaitMillis="3000"
>
>    name="jdbc/postgresqlconnection"
>
>    type="javax.sql.DataSource"
>
>    url="jdbc:postgresql://127.0.0.1:5432/onbbp? connectionTimeout=2&amp;
> socketTimeout=2"
>
>    factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
>
>    username="user"
>
>    password="pass"
>
> />
>
>
>
> This is my apps’s persistence.xml
>
>
>
> <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
>              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";
>
>              version="2.0" xmlns="http://java.sun.com/xml/ns/persistence";
>
>     <persistence-unit name="bp-persistence" transaction-type="RESOURCE_
> LOCAL">
>
>         <provider>org.eclipse.persistence.jpa.
> PersistenceProvider</provider>
>
>         <non-jta-data-source>java:comp/env/jdbc/
> postgresqlconnection</non-jta-data-source>
>
>         <class>com.all.onbbp.database.entities.BpUser</class>
>
>         <class>com. all.onbbp.database.entities.BusinessPartner</class>
>
>         <class>com. all.onbbp.database.entities.Enterprise</class>
>
>         <class>com. all.onbbp.database.entities.Property</class>
>
>         <class>com. all.onbbp.database.entities.LokiCookie</class>
>
>         <class>com. all.onbbp.database.entities.Report</class>
>
>         <class>com. all.onbbp.database.entities.Languages</class>
>
>         <class>com. all.onbbp.database.entities.EmailTemplates</class>
>
>         <class>com. all.onbbp.database.entities.BpMutex</class>
>
>         <class>com. all.onbbp.database.entities.UserSession</class>
>
>         <shared-cache-mode>NONE</shared-cache-mode>
>
>         <properties>
>
>                 <property name="javax.persistence.validation.mode"
> value="AUTO" />
>
>                 <property name="eclipselink.logging.level"
> value="FINEST"/>
>
>         </properties>
>
>     </persistence-unit>
>
> </persistence>
>
>
>
> Btw the, this is how the EntityManager is initialized
>
>
>
> public class StartupListener implements ServletContextListener {
>
>
>
>     …
>
>     private static EntityManagerFactory entityManagerFactory;
>
>
>
>     @Override
>
>     public void contextInitialized(ServletContextEvent sce) {
>
>         try {
>
>             try {
>
>                 entityManagerFactory = Persistence.
> createEntityManagerFactory("bp-persistence");
>
>             } catch (Throwable ex) {
>
>                 throw new BPException(BPErrorCode.
> INTERNAL_SERVER_ERROR_DB_ERROR);
>
>             }
>
>
>
> Does anyone has an idea? Why does the connectionTimeout to the database
> take so long to return (more than 12 seconds)?
>
>
>
> Many thanks in advance for any reply
>
> Alexandre
>
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
@ 2016-08-30 15:23 ` Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 15:31   ` Re: SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Jingzhi Zhang @ 2016-08-30 15:23 UTC (permalink / raw)
  To: Alexandre Brito <alexandre.brito@wit-software.com>; +Cc: pgsql-jdbc

In the log, there are only one [EL Warning], all other retries logging are [EL Info].
So it is EL controls the retries behavior(just as connection pool), not JDBC.
 


> 在 2016年8月25日,19:22,Alexandre Brito <alexandre.brito@wit-software.com <mailto:alexandre.brito@wit-software.com>> 写道:
> 
> Hi,
>  
> We are facing a problem with the JBDC connection being drop silently and the driver is not throwing a SQL Exception in a timely manner. 
> Going through the mailing-list and the internet, it seems the problem is not so rare however the solution is still out of my reach.
>  
> What is happening is simple:
> 1.       JDBC connection is open and then stays idle
> 2.       A network component (Fortinet)  beyond our control seems to be dropping idle TCP connections.
> 3.       Our webapp places a query and it takes 1min and 12 seconds (more or less) for the SQL Exception to be caught. 
>  
> We’ve reproduced the issue behaviour (on our environment ) by setting an iptables rule blocking port 5432 after the DB connection was successfully established. On the logs I can see the socket read (I think) timeout is around 12 seconds and then there are 6 retries 10 secs apart.  (see the extracted log file from tomcat attached with EL log to finest) 
>  
> I would like to have control over the number of retries and timeout. Basically, I would like the receive an SQL Connection Timeout Exception within 5-10 seconds. 
>  
> We are using tomcat 8 and latest JDCB driver (9.4.1209 JDBC42) and JPA.
>  
> Our schema is tiny and the data in it very very small. 
>  
> This is my tomcat’s context.xml (for troubleshooting proposes) . 
>  
> <Resource auth="Container"
>    driverClassName="org.postgresql.Driver"
>    maxTotal="1"
>    maxIdle="1"
>    maxWaitMillis="3000"
>    name="jdbc/postgresqlconnection"
>    type="javax.sql.DataSource"
>    url="jdbc:postgresql://127.0.0.1:5432/onbbp? connectionTimeout=2&amp;socketTimeout=2"
>    factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
>    username="user"
>    password="pass"
> /> 
>  
> This is my apps’s persistence.xml
>  
> <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>";
>              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence <http://java.sun.com/xml/ns/persistence>http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd <http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd>";
>              version="2.0" xmlns="http://java.sun.com/xml/ns/persistence <http://java.sun.com/xml/ns/persistence>";
>     <persistence-unit name="bp-persistence" transaction-type="RESOURCE_LOCAL">
>         <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>         <non-jta-data-source>java:comp/env/jdbc/postgresqlconnection</non-jta-data-source>
>         <class>com.all.onbbp.database.entities.BpUser</class>
>         <class>com. all.onbbp.database.entities.BusinessPartner</class>
>         <class>com. all.onbbp.database.entities.Enterprise</class>
>         <class>com. all.onbbp.database.entities.Property</class>
>         <class>com. all.onbbp.database.entities.LokiCookie</class>
>         <class>com. all.onbbp.database.entities.Report</class>
>         <class>com. all.onbbp.database.entities.Languages</class>
>         <class>com. all.onbbp.database.entities.EmailTemplates</class>
>         <class>com. all.onbbp.database.entities.BpMutex</class>
>         <class>com. all.onbbp.database.entities.UserSession</class>
>         <shared-cache-mode>NONE</shared-cache-mode>
>         <properties>
>                 <property name="javax.persistence.validation.mode" value="AUTO" />
>                 <property name="eclipselink.logging.level" value="FINEST"/>
>         </properties>
>     </persistence-unit>
> </persistence>
>                 
> Btw the, this is how the EntityManager is initialized
>  
> public class StartupListener implements ServletContextListener {
>  
>     …
>     private static EntityManagerFactory entityManagerFactory;
>  
>     @Override
>     public void contextInitialized(ServletContextEvent sce) {
>         try {
>             try {
>                 entityManagerFactory = Persistence.createEntityManagerFactory("bp-persistence");
>             } catch (Throwable ex) {
>                 throw new BPException(BPErrorCode.INTERNAL_SERVER_ERROR_DB_ERROR);
>             }
>  
> Does anyone has an idea? Why does the connectionTimeout to the database take so long to return (more than 12 seconds)? 
>  
> Many thanks in advance for any reply
> Alexandre
>  
> <connectioTimeout_takes_too_long.txt>
> -- 
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org <mailto:pgsql-jdbc@postgresql.org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc <http://www.postgresql.org/mailpref/pgsql-jdbc;

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:23 ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
@ 2016-08-30 15:31   ` Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:54     ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Alexandre Brito @ 2016-08-30 15:31 UTC (permalink / raw)
  To: 'Jingzhi Zhang' <jingzhi.zhang@outlook.com>; +Cc: pgsql-jdbc

Hello,



Hm, ok. Do you know how to control the retries behaviour from the EL?

Please bear in mind that we are using the latest JDBC driver available at
postgresql.org (which includes EL).



Regards,

Alex



From: Jingzhi Zhang [mailto:jingzhi.zhang@outlook.com]
Sent: 30 August 2016 16:23
To: Alexandre Brito <alexandre.brito@wit-software.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] SocketTimeout and ConnectionTimeout



In the log, there are only one [EL Warning], all other retries logging are
[EL Info].

So it is EL controls the retries behavior(just as connection pool), not
JDBC.







$B:_(B 2016$BG/(B8$B7n(B25$BF|!$(B19:22$B!$(BAlexandre Brito <alexandre.brito@wit-software.com
<mailto:alexandre.brito@wit-software.com> > $B<LF;!'(B



Hi,



We are facing a problem with the JBDC connection being drop silently and the
driver is not throwing a SQL Exception in a timely manner.

Going through the mailing-list and the internet, it seems the problem is not
so rare however the solution is still out of my reach.



What is happening is simple:

1.       JDBC connection is open and then stays idle

2.       A network component (Fortinet)  beyond our control seems to be
dropping idle TCP connections.

3.       Our webapp places a query and it takes 1min and 12 seconds (more or
less) for the SQL Exception to be caught.



We$B!G(Bve reproduced the issue behaviour (on our environment ) by setting an
iptables rule blocking port 5432 after the DB connection was successfully
established. On the logs I can see the socket read (I think) timeout is
around 12 seconds and then there are 6 retries 10 secs apart.  (see the
extracted log file from tomcat attached with EL log to finest)



I would like to have control over the number of retries and timeout.
Basically, I would like the receive an SQL Connection Timeout Exception
within 5-10 seconds.



We are using tomcat 8 and latest JDCB driver (9.4.1209 JDBC42) and JPA.



Our schema is tiny and the data in it very very small.



This is my tomcat$B!G(Bs context.xml (for troubleshooting proposes) .



<Resource auth="Container"

   driverClassName="org.postgresql.Driver"

   maxTotal="1"

   maxIdle="1"

   maxWaitMillis="3000"

   name="jdbc/postgresqlconnection"

   type="javax.sql.DataSource"

   url="jdbc:postgresql://127.0.0.1:5432/onbbp?
connectionTimeout=2&amp;socketTimeout=2"

   factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"

   username="user"

   password="pass"

/>



This is my apps$B!G(Bs persistence.xml



<persistence xmlns:xsi=" <http://www.w3.org/2001/XMLSchema-instance;
http://www.w3.org/2001/XMLSchema-instance";

             xsi:schemaLocation=" <http://java.sun.com/xml/ns/persistence;
http://java.sun.com/xml/ns/persistence
<http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";

             version="2.0" xmlns=" <http://java.sun.com/xml/ns/persistence;
http://java.sun.com/xml/ns/persistence";

    <persistence-unit name="bp-persistence"
transaction-type="RESOURCE_LOCAL">

        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>


<non-jta-data-source>java:comp/env/jdbc/postgresqlconnection</non-jta-data-s
ource>

        <class>com.all.onbbp.database.entities.BpUser</class>

        <class>com. all.onbbp.database.entities.BusinessPartner</class>

        <class>com. all.onbbp.database.entities.Enterprise</class>

        <class>com. all.onbbp.database.entities.Property</class>

        <class>com. all.onbbp.database.entities.LokiCookie</class>

        <class>com. all.onbbp.database.entities.Report</class>

        <class>com. all.onbbp.database.entities.Languages</class>

        <class>com. all.onbbp.database.entities.EmailTemplates</class>

        <class>com. all.onbbp.database.entities.BpMutex</class>

        <class>com. all.onbbp.database.entities.UserSession</class>

        <shared-cache-mode>NONE</shared-cache-mode>

        <properties>

                <property name="javax.persistence.validation.mode"
value="AUTO" />

                <property name="eclipselink.logging.level" value="FINEST"/>

        </properties>

    </persistence-unit>

</persistence>



Btw the, this is how the EntityManager is initialized



public class StartupListener implements ServletContextListener {



    $B!D(B

    private static EntityManagerFactory entityManagerFactory;



    @Override

    public void contextInitialized(ServletContextEvent sce) {

        try {

            try {

                entityManagerFactory =
Persistence.createEntityManagerFactory("bp-persistence");

            } catch (Throwable ex) {

                throw new
BPException(BPErrorCode.INTERNAL_SERVER_ERROR_DB_ERROR);

            }



Does anyone has an idea? Why does the connectionTimeout to the database take
so long to return (more than 12 seconds)?



Many thanks in advance for any reply

Alexandre



<connectioTimeout_takes_too_long.txt>
--
Sent via pgsql-jdbc mailing list ( <mailto:pgsql-jdbc@postgresql.org>
pgsql-jdbc@postgresql.org)
To make changes to your subscription:
 <http://www.postgresql.org/mailpref/pgsql-jdbc;
http://www.postgresql.org/mailpref/pgsql-jdbc

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:23 ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 15:31   ` Re: SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
@ 2016-08-30 15:54     ` Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 16:02       ` Re: SocketTimeout and ConnectionTimeout Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Jingzhi Zhang @ 2016-08-30 15:54 UTC (permalink / raw)
  To: Alexandre Brito <alexandre.brito@wit-software.com>; +Cc: pgsql-jdbc

EL is a ORM framework, not part of JDBC driver, right? 

http://stackoverflow.com/questions/5289075/how-to-modify-eclipselink-jpa-2-0-connection-retry-behavi... <http://stackoverflow.com/questions/5289075/how-to-modify-eclipselink-jpa-2-0-connection-retry-behavi...;


> 在 2016年8月30日,23:31,Alexandre Brito <alexandre.brito@wit-software.com <mailto:alexandre.brito@wit-software.com>> 写道:
> 
> Hello,
>  
> Hm, ok. Do you know how to control the retries behaviour from the EL? 
> Please bear in mind that we are using the latest JDBC driver available at postgresql.org <http://postgresql.org/>(which includes EL).

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:23 ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 15:31   ` Re: SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:54     ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
@ 2016-08-30 16:02       ` Dave Cramer <pg@fastcrypt.com>
  2016-08-30 16:12         ` Re: SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Cramer @ 2016-08-30 16:02 UTC (permalink / raw)
  To: Jingzhi Zhang <jingzhi.zhang@outlook.com>; +Cc: Alexandre Brito <alexandre.brito@wit-software.com>; pgsql-jdbc

It is not part of the driver...

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 30 August 2016 at 11:54, Jingzhi Zhang <jingzhi.zhang@outlook.com> wrote:

> EL is a ORM framework, not part of JDBC driver, right?
>
> http://stackoverflow.com/questions/5289075/how-to-
> modify-eclipselink-jpa-2-0-connection-retry-behavior
>
>
> 在 2016年8月30日,23:31,Alexandre Brito <alexandre.brito@wit-software.com> 写道:
>
> Hello,
>
> Hm, ok. Do you know how to control the retries behaviour from the EL?
> Please bear in mind that we are using the latest JDBC driver available at
> postgresql.org(which includes EL).
>
>
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: SocketTimeout and ConnectionTimeout
  2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:23 ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 15:31   ` Re: SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
  2016-08-30 15:54     ` Re: SocketTimeout and ConnectionTimeout Jingzhi Zhang <jingzhi.zhang@outlook.com>
  2016-08-30 16:02       ` Re: SocketTimeout and ConnectionTimeout Dave Cramer <pg@fastcrypt.com>
@ 2016-08-30 16:12         ` Alexandre Brito <alexandre.brito@wit-software.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexandre Brito @ 2016-08-30 16:12 UTC (permalink / raw)
  To: 'Dave Cramer' <pg@fastcrypt.com>; 'Jingzhi Zhang' <jingzhi.zhang@outlook.com>; +Cc: pgsql-jdbc

Hello,

 

In that case the EL is shipped with tomcat 8 and apologies for assuming it was within the driver.

I’ll look at this from the EL implementation and try to figure it out.

 

Thank you for your support

 

Regards

Alex

 

From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of Dave Cramer
Sent: 30 August 2016 17:02
To: Jingzhi Zhang <jingzhi.zhang@outlook.com>
Cc: Alexandre Brito <alexandre.brito@wit-software.com>; List <pgsql-jdbc@postgresql.org>
Subject: Re: [JDBC] SocketTimeout and ConnectionTimeout

 

It is not part of the driver...




Dave Cramer

davec@postgresintl.com <mailto:davec@postgresintl.com> 

www.postgresintl.com <http://www.postgresintl.com; 

 

On 30 August 2016 at 11:54, Jingzhi Zhang <jingzhi.zhang@outlook.com <mailto:jingzhi.zhang@outlook.com> > wrote:

EL is a ORM framework, not part of JDBC driver, right? 

 

http://stackoverflow.com/questions/5289075/how-to-modify-eclipselink-jpa-2-0-connection-retry-behavi...

 

 

在 2016年8月30日,23:31,Alexandre Brito <alexandre.brito@wit-software.com <mailto:alexandre.brito@wit-software.com> > 写道:

 

Hello,

 

Hm, ok. Do you know how to control the retries behaviour from the EL? 

Please bear in mind that we are using the latest JDBC driver available at  <http://postgresql.org/; postgresql.org(which includes EL).

 

 

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2016-08-30 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 11:22 SocketTimeout and ConnectionTimeout Alexandre Brito <alexandre.brito@wit-software.com>
2016-08-25 17:03 ` Dave Cramer <pg@fastcrypt.com>
2016-08-30 15:23 ` Jingzhi Zhang <jingzhi.zhang@outlook.com>
2016-08-30 15:31   ` Alexandre Brito <alexandre.brito@wit-software.com>
2016-08-30 15:54     ` Jingzhi Zhang <jingzhi.zhang@outlook.com>
2016-08-30 16:02       ` Dave Cramer <pg@fastcrypt.com>
2016-08-30 16:12         ` Alexandre Brito <alexandre.brito@wit-software.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox