Bonjour à tous,
J'ai un problème avec la datasource de JONAS. (du moins il semblerait)
En fait en l'état actuel, lorsqu'on a une coupure de la base de données (redémarrage par exemple) les requêtes qui suivent renvoient une erreur du style :
Puis au bout de plusieurs erreur (apparement autant qu'il y a de connection existante dans le pool) l'erreur devient
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
29
30
31
32
33
34
35
36
37 *** 2009-06-24 16:38:58,965 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 08S01 [http-9000-Processor25] C079C8C600500E6B4660B9DC2F92115F.jonas-1 *** 2009-06-24 16:38:58,965 ERROR [JDBCExceptionReporter] Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Software caused connection abort: socket write error STACKTRACE: java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622) at com.mysql.jdbc.Connection.execSQL(Connection.java:2376) at com.mysql.jdbc.Connection.execSQL(Connection.java:2297) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1860) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1705) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1668) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2144) at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2060) at org.hibernate.loader.Loader.list(Loader.java:2020) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at com.iv4.accessbean.hibernate.GestionMobileAccessBeanImpl.getReunions(GestionMobileAccessBeanImpl.java:73
Et il est necessaire de relancer JONAS pour que ca remarche.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 *** 2009-06-24 16:40:20,747 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 08003 [http-9000-Processor24] C079C8C600500E6B4660B9DC2F92115F.jonas-1 *** 2009-06-24 16:40:20,747 ERROR [JDBCExceptionReporter] No operations allowed after connection closed. [http-9000-Processor24] C079C8C600500E6B4660B9DC2F92115F.jonas-1 *** 2009-06-24 16:40:20,762 ERROR [TomcatBridge] Erreur technique BV dans getRacingContext(24/06/2009 12:00:00) [http-9000-Processor24] C079C8C600500E6B4660B9DC2F92115F.jonas-1 com.iv4.exception.BVTechException at com.iv4.accessbean.bv.InterfaceBV.getReunions(InterfaceBV.java:756
La configuration actuelle du datasource est la suivante :
J'ai réussi à résoudre le problème en modifiant la configuration du datasource avec
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 datasource.name jdbc/LiferayPool datasource.url jdbc:mysql://server/base?useUnicode=true&characterEncoding=UTF-8 datasource.classname com.mysql.jdbc.Driver datasource.username iv4user datasource.password iv4pass datasource.mapper rdb.mysql # JDBC connection checking level. # 0 = no special checking # 1 = check physical connection is still open before reusing it # 2 = try every connection before reusing it jdbc.connchecklevel 0 # Max age for jdbc connections # nb of minutes a connection can be kept in the pool # By default mySQL has a timeout every 8 hours, use a value of 7h jdbc.connmaxage 420 # Maximum time (in mn) a connection can be left busy. # If the caller has not issued a close() during this time, the connection # will be closed automatically. jdbc.maxopentime 15 # Test statement jdbc.connteststmt select 1 # JDBC Connection Pool size. # Limiting the max pool size avoids errors from database. jdbc.minconpool 10 jdbc.maxconpool 50 # Sampling period for JDBC monitoring : # nb of seconds between 2 measures. jdbc.samplingperiod 30 # Maximum time (in seconds) to wait for a connection in case of shortage. # This may occur only when maxconpool is reached. jdbc.maxwaittime 10 # Maximum of concurrent waiters for a JDBC Connection # This may occur only when maxconpool is reached. jdbc.maxwaiters 100 # Maximum number of Prepare Statements cached in a Connection jdbc.pstmtmax 120
Mais niveau performance
Code : Sélectionner tout - Visualiser dans une fenêtre à part jdbc.connchecklevel 2
, je doute que ce soit très efficace !
J'ai aussi essayé avec
Le Datasource arrive a refournir des connections valide, mais on dirait qu'il vide sont pool de ses connection foireuses avant de rouvrir de nouvelles connections ... Ce qui n'est toujours pas satisfaisant.
Code : Sélectionner tout - Visualiser dans une fenêtre à part jdbc.connchecklevel 1
Donc je ne sais pas si ce genre de problème vous parle ?
Est-ce normal que le DataSource ne soit pas capable de fournir de nouvelles connections après une perte de la BDD !?
Ou est-ce que que vous avez une idée de ce qui pourrait provoquer ce type de dysfonctionnement ?
D'avance merci,
Partager