Bonjour,

Voilà, nous sommes en cours de développement de web services java avec une base de données POSTGRESQL.

pour info, nous sommes sur un serveur CentOs, et un postgres 8.4.

Au niveau java, nous utilisons SPRING, JDBC et BONECP.

Nous rencontrons un problème d'utilisation mémoire que je n'arrive pas à résoudre. Lorsque j'appelle un web service, les process postgres sur le serveur s'accumule, donc au bout d'un certain nombre de requête, le serveur sature.

Voici la liste des process :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
postgres  3798  2.1  0.1 207832  6140 ?        S    12:22   0:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres  3996  0.0  0.0 179244  1400 ?        Ss   12:22   0:00 postgres: logger process                          
postgres  3999  0.0  0.0 207832  1664 ?        Ss   12:22   0:00 postgres: writer process                          
postgres  4000  0.0  0.0 207832  1592 ?        Ss   12:22   0:00 postgres: wal writer process                      
postgres  4001  0.0  0.0 207972  1984 ?        Ss   12:22   0:00 postgres: autovacuum launcher process             
postgres  4002  0.0  0.0 179376  1640 ?        Ss   12:22   0:00 postgres: stats collector process                 
postgres  5584  0.0  0.1 209144  5116 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35375) idle     
postgres  5585  0.0  0.1 209052  4420 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35376) idle     
postgres  5586  0.0  0.0 208916  3360 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35377) idle     
postgres  5588  0.0  0.0 208916  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35378) idle     
postgres  5589  0.0  0.0 208916  3352 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35379) idle     
postgres  5592  0.0  0.0 208916  3360 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35380) idle     
postgres  5593  0.0  0.0 208924  3368 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35381) idle     
postgres  5594  0.0  0.0 208924  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35382) idle     
postgres  5595  0.0  0.0 208924  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35383) idle     
postgres  5596  0.0  0.0 208924  3364 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35384) idle
et après lancement d'une nouvelle requête :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
postgres  3798  0.8  0.1 207832  6140 ?        S    12:22   0:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres  3996  0.0  0.0 179244  1400 ?        Ss   12:22   0:00 postgres: logger process                          
postgres  3999  0.0  0.0 207832  1728 ?        Ss   12:22   0:00 postgres: writer process                          
postgres  4000  0.0  0.0 207832  1592 ?        Ss   12:22   0:00 postgres: wal writer process                      
postgres  4001  0.0  0.0 207972  1984 ?        Ss   12:22   0:00 postgres: autovacuum launcher process             
postgres  4002  0.0  0.0 179376  1640 ?        Ss   12:22   0:00 postgres: stats collector process                 
postgres  5584  0.0  0.1 209144  5116 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35375) idle     
postgres  5585  0.0  0.1 209052  4420 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35376) idle     
postgres  5586  0.0  0.0 208916  3360 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35377) idle     
postgres  5588  0.0  0.0 208916  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35378) idle     
postgres  5589  0.0  0.0 208916  3352 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35379) idle     
postgres  5592  0.0  0.0 208916  3360 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35380) idle     
postgres  5593  0.0  0.0 208924  3368 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35381) idle     
postgres  5594  0.0  0.0 208924  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35382) idle     
postgres  5595  0.0  0.0 208924  3356 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35383) idle     
postgres  5596  0.0  0.0 208924  3364 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(35384) idle     
postgres  5982  0.0  0.1 209068  5180 ?        Ss   12:23   0:00 postgres: pguser postgres 109.0.63.65(41187) idle 
postgres  7560  0.0  0.1 209144  5040 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38341) idle     
postgres  7562  0.0  0.1 209052  4428 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38342) idle     
postgres  7563  0.0  0.0 208916  3368 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38343) idle     
postgres  7564  0.0  0.0 208916  3372 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38344) idle     
postgres  7565  0.0  0.0 208916  3368 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38345) idle     
postgres  7568  0.0  0.0 208924  3360 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38346) idle     
postgres  7569  0.0  0.0 208924  3368 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38347) idle     
postgres  7572  0.0  0.0 208924  3376 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38348) idle     
postgres  7573  0.0  0.0 208928  3372 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38349) idle     
postgres  7575  0.0  0.0 208928  3376 ?        Ss   12:23   0:00 postgres: pguser projet 127.0.0.1(38350) idle
Est-ce un problème de configuration Postgres ?

D'avance merci.

Vince