View Issue Details

IDProjectCategoryView StatusLast Update
0000286Pgpool-IIBugpublic2017-05-01 13:53
Reporterfmarino Assigned Tot-ishii  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Platformpostgres 9.5OSCentos OS Version7.3
Product Version3.6.1 
Target Version3.6.3 
Summary0000286: pgpool hangs with hibernate and spring
DescriptionDear all,
I have a java application that uses hibernate to connect to postgres. There is also a connection pool in between, but when the application start up it hangs on acquiring connection.

I've tried with version 3.5.4 and 3.6.1 but the problem persist. I'm using pgpool inside docker, the config files are the folliwings:
https://github.com/CrunchyData/crunchy-containers/tree/master/conf/pgpool



Regards,
Fernando



Steps To ReproduceThe problem can be easily reproduced using official spring boot examples.

Clone the following:
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-data-jpa

Create an application.properties with the following content:

spring.datasource.url=jdbc:postgresql://localhost:5433/dhus
spring.datasource.username=postgres
spring.datasource.password=password
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.maximum-pool-size=100
spring.datasource.initial-size=10
spring.datasource.pool-name=test

add the jdbc driver dependency to the pom.xml
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

run with:
mvn spring-boot:run
Additional InformationFor your convenience here you can find a builded version of the jar file to reproduce the issue:

https://www.dropbox.com/s/q103bmk0yfeq7lt/spring-boot-sample-data-jpa.zip?dl=0

you can run it with java -jar spring-boot-samples-xxx.jar
the application.properties contains connection configs and shall be placed next to the jar.

Attached also the pgpool logs in debug mode.
TagsNo tags attached.

Activities

fmarino

2017-02-06 17:48

reporter  

pgpool-logs.zip (22,656 bytes)

supp_k

2017-02-06 18:29

reporter   ~0001332

Hi Fmarino,

Once we also faced such behavior. After update of jdbc driver the problem disappeared. I recommend you to try this solution.

fmarino

2017-02-06 18:43

reporter   ~0001333

Hi supp_k,
Thank you for your answer.
I'm using jdbc driver version 1212 which is the latest available, but the problem persist. I tried both jdbc 4.1 and 4.2 versions.

Fernando

t-ishii

2017-02-23 15:39

developer   ~0001354

I have created a patch which possibly fixes your problem. Can you please try it out?

http://www.pgpool.net/mantisbt/file_download.php?file_id=295&type=bug

fmarino

2017-02-23 19:40

reporter   ~0001361

Hi t-ishii, thank you for your work.

I've tried your patch, but unfortunately the problem remains. I've attached the logs.

I hope I didn't mess something up applying the patch.
pgpool.log (100,257 bytes)

t-ishii

2017-02-28 13:40

developer   ~0001367

Can you please attached the file to this bug track system?

https://www.dropbox.com/s/q103bmk0yfeq7lt/spring-boot-sample-data-jpa.zip?dl=0

I don't have an account for dropbox.

fmarino

2017-02-28 18:31

reporter   ~0001370

Hi,
the file is too big to be an attachment. I've published it here:
https://support.sentinel3.eo.esa.int/spring-boot-sample-data-jpa.zip

zjsnxc

2017-03-14 06:43

reporter   ~0001377

We actually observes the same issue in our system, actually it only hangs when we enable the "load_balance_mode"

t-ishii

2017-03-26 16:07

developer   ~0001396

I have fixed similar issue recently.
http://www.pgpool.net/pipermail/pgpool-hackers/2017-March/002182.html

I have created a git branch for this issue.
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=shortlog;h=refs/heads/bug271

Can you please try it out?

t-ishii

2017-03-30 09:33

developer   ~0001401

The bug271 branch has been merged into master, 3.6 stable and 3.5 stable branches. So the problem has been already solved in the branches. We will release next minor releases in April.

t-ishii

2017-05-01 13:53

developer   ~0001487

No feedback over 1 month. Item closed.

Issue History

Date Modified Username Field Change
2017-02-06 17:48 fmarino New Issue
2017-02-06 17:48 fmarino File Added: pgpool-logs.zip
2017-02-06 18:29 supp_k Note Added: 0001332
2017-02-06 18:43 fmarino Note Added: 0001333
2017-02-08 14:27 t-ishii Assigned To => t-ishii
2017-02-08 14:27 t-ishii Status new => assigned
2017-02-23 15:39 t-ishii Note Added: 0001354
2017-02-23 15:39 t-ishii Status assigned => feedback
2017-02-23 19:40 fmarino File Added: pgpool.log
2017-02-23 19:40 fmarino Note Added: 0001361
2017-02-23 19:40 fmarino Status feedback => assigned
2017-02-28 13:40 t-ishii Note Added: 0001367
2017-02-28 13:42 t-ishii Status assigned => feedback
2017-02-28 18:31 fmarino Note Added: 0001370
2017-02-28 18:31 fmarino Status feedback => assigned
2017-03-14 06:43 zjsnxc Note Added: 0001377
2017-03-26 16:07 t-ishii Note Added: 0001396
2017-03-26 16:09 t-ishii Status assigned => feedback
2017-03-30 09:33 t-ishii Note Added: 0001401
2017-03-30 09:34 t-ishii Target Version => 3.6.3
2017-05-01 13:53 t-ishii Note Added: 0001487
2017-05-01 13:53 t-ishii Status feedback => closed