View Issue Details

IDProjectCategoryView StatusLast Update
0000304Pgpool-IIBugpublic2017-08-04 14:39
ReporterPhoenix55 Assigned Tot-ishii  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Platformx64OSCentosOS Version 7.3.1611
Product Version3.6.2 
Summary0000304: Hibernate is hanging in connect PGPOOL-II
DescriptionI installed PGPOOL-II 3.6.2. PGPOOL-II is configured as master-slave mode.I use Hibernate in java as frontend to connect PGPOOL. DataSource in Apache Karaf is hanging in connect PGPOOL-II.

The command to create Datasouce in Karaf
ds-create -dc org.postgresql.Driver-pool-xa -dbName DBNAME -url jdbc:postgresql://ip:port/ifso?tcpKeepAlive=true -u user -p password name_source

DataSouce hanging after 1 call with select query

If you create a DataSource with the following command, it works very slowly
ds-create -dc org.postgresql.Driver -dbName DBNAME -url jdbc:postgresql://ip:port/ifso?tcpKeepAlive=true -u user -p password name_source

Hanging here
Apr 20 06:58:07 msk-kftr-pgpool01 pgpool[15640]: [5679-1] 2017-04-20 06:58:07: pid 15640: LOG: DB node id: 1 backend pid: 23299 statement: Execute: select count(*) from public.usage_spec_characteristic where 1=1
TagsNo tags attached.

Activities

Phoenix55

2017-04-20 13:30

reporter  

pgpool.log (1,400,065 bytes)

Phoenix55

2017-04-20 15:55

reporter  

pgpool.conf (34,515 bytes)

Phoenix55

2017-04-21 17:30

reporter   ~0001447

Included statistics in karaf and at the time of decrease in the speed of the log: 5 068 149 685 nanoseconds spent acquiring 1 JDBC connections;

Phoenix55

2017-04-21 17:32

reporter   ~0001448

feature karaf:
pax-jdbc-config | 1.1.0 | x | Started | org.ops4j.pax.jdbc-1.1.0 | Provides JDBC Config support
p
pax-jdbc-h2 | 1.1.0 | x | Started | org.ops4j.pax.jdbc-1.1.0 | Provides JDBC H2 DataSourceFactory
pax-jdbc-postgresql | 1.1.0 | x | Started | org.ops4j.pax.jdbc-1.1.0 | Provides JDBC PostgreSQL DataSourceFactory
pax-jdbc-pool-dbcp2 | 1.1.0 | x | Started | org.ops4j.pax.jdbc-1.1.0 | Provides JDBC Pooling DataSourceFactory
pax-jdbc-pool-c3p0 | 1.1.0 | x | Started | org.ops4j.pax.jdbc-1.1.0 | Provides JDBC Pooling using C3P0

Phoenix55

2017-04-21 17:33

reporter   ~0001449

karaf@root()> service:list DataSource
[javax.sql.DataSource]
----------------------
 databaseName = ifso
 dataSourceName = post_ifso
 osgi.jdbc.driver.class = org.postgresql.Driver
 osgi.jndi.service.name = post_ifso
 password = postgres
 service.bundleid = 193
 service.factoryPid = org.ops4j.datasource
 service.id = 256
 service.pid = org.ops4j.datasource.eabe8359-a82e-45db-b4dd-c381c9acfb06
 service.scope = singleton
 url = jdbc:postgresql://10.77.3.33:9999/ifso?tcpKeepAlive=true
 user = postgres
Provided by :
 OPS4J Pax JDBC Config (193)
Used by:
 iFSO :: User Interface (160)
 Apache Karaf :: JDBC :: Core (141)

Phoenix55

2017-04-21 17:33

reporter   ~0001450

Checked with the version of pgpool 3.7Devel. The situation is similar

Phoenix55

2017-04-21 18:01

reporter   ~0001451

Version Postgres: Postgresql PRO 9.5.6

supp_k

2017-04-26 03:48

reporter   ~0001473

Hi Phoenix55,

I'm also was facing the similar issue. But in my case I faced trouble to detect the query which hangs because the issue is being reproduced in a very complex scenario.
Can you please enable hibernate logging or jdbc logging in connection string?
Probably together we will be able to identify the case - some specific query which causes issue.

Phoenix55

2017-04-26 11:20

reporter  

ifso_log_query.log (1,796,867 bytes)

Phoenix55

2017-04-26 11:20

reporter  

pgpool-2.log (423,861 bytes)

Phoenix55

2017-04-26 11:20

reporter  

ifso_log_query-2.log (1,796,867 bytes)

Phoenix55

2017-04-26 11:24

reporter   ~0001474

Enabled the hibernate log, made cp /dev/null before the test and on pgpool and into the hibernate log. The greatest slowdown in these requests

t-ishii

2017-05-09 14:58

developer   ~0001499

Can you please provide JDBC log and Pgpool-II log with Pgpool-II 3.7 devel?

Phoenix55

2017-05-11 12:29

reporter   ~0001503

The question is settled.
Setting the datasource in hibernate

Jdbc.pool.maxTotal = 50
Jdbc.pool.minIdle = 5

t-ishii

2017-05-16 09:49

developer   ~0001510

I repeat my request: Can you please provide JDBC log and Pgpool-II log with Pgpool-II 3.7 devel?

Phoenix55

2017-05-22 18:51

reporter   ~0001521

Now everything is transferred to the pro version for version 3.6.3 and there is no possibility to reset the log, because It is used in monitoring. Yes, and the logs you ask, previously applied.

t-ishii

2017-06-28 10:16

developer   ~0001554

Can you specify which process number of Pgpool-II hangs in
https://www.pgpool.net/mantisbt/file_download.php?file_id=329&type=bug ?

Phoenix55

2017-06-28 11:04

reporter   ~0001555

No I can not

t-ishii

2017-06-28 11:19

developer   ~0001556

Ok, I will wait till the requested info is available.

t-ishii

2017-08-04 14:39

developer   ~0001626

No response over 1 month. Issue closed.

Issue History

Date Modified Username Field Change
2017-04-20 13:30 Phoenix55 New Issue
2017-04-20 13:30 Phoenix55 File Added: pgpool.log
2017-04-20 15:55 Phoenix55 File Added: pgpool.conf
2017-04-21 17:30 Phoenix55 Note Added: 0001447
2017-04-21 17:32 Phoenix55 Note Added: 0001448
2017-04-21 17:33 Phoenix55 Note Added: 0001449
2017-04-21 17:33 Phoenix55 Note Added: 0001450
2017-04-21 18:01 Phoenix55 Note Added: 0001451
2017-04-26 03:48 supp_k Note Added: 0001473
2017-04-26 11:20 Phoenix55 File Added: ifso_log_query.log
2017-04-26 11:20 Phoenix55 File Added: pgpool-2.log
2017-04-26 11:20 Phoenix55 File Added: ifso_log_query-2.log
2017-04-26 11:24 Phoenix55 Note Added: 0001474
2017-05-09 14:58 t-ishii Note Added: 0001499
2017-05-11 12:29 Phoenix55 Note Added: 0001503
2017-05-16 09:49 t-ishii Note Added: 0001510
2017-05-16 09:50 t-ishii Assigned To => t-ishii
2017-05-16 09:50 t-ishii Status new => feedback
2017-05-22 18:51 Phoenix55 Note Added: 0001521
2017-05-22 18:51 Phoenix55 Status feedback => assigned
2017-06-28 10:16 t-ishii Note Added: 0001554
2017-06-28 10:16 t-ishii Status assigned => feedback
2017-06-28 11:04 Phoenix55 Note Added: 0001555
2017-06-28 11:04 Phoenix55 Status feedback => assigned
2017-06-28 11:19 t-ishii Note Added: 0001556
2017-06-28 11:20 t-ishii Status assigned => feedback
2017-08-04 14:39 t-ishii Note Added: 0001626
2017-08-04 14:39 t-ishii Status feedback => closed