mysql:problemresolution
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mysql:problemresolution [2013/07/23 15:50] – rlunaro | mysql:problemresolution [2013/10/04 10:10] (current) – removed rlunaro | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Problem Resolution ====== | ||
- | |||
- | ===== Problem ===== | ||
- | |||
- | < | ||
- | 07/20 01:38:26 hibernate.util.JDBCExceptionReporter | ||
- | |||
- | The last packet successfully received from the server was 7.202.618 milliseconds ago. The last packet sent successfully to the server was 7.202.618 milliseconds ago. | ||
- | |||
- | |||
- | </ | ||
- | |||
- | ===== Some tools ===== | ||
- | |||
- | |||
- | This will show you the current connections: | ||
- | |||
- | < | ||
- | show status like ' | ||
- | </ | ||
- | |||
- | Example of output: | ||
- | |||
- | < | ||
- | mysql> show status like ' | ||
- | +--------------------------+-------+ | ||
- | | Variable_name | ||
- | +--------------------------+-------+ | ||
- | | Aborted_connects | ||
- | | Connections | ||
- | | Max_used_connections | ||
- | | Ssl_client_connects | ||
- | | Ssl_connect_renegotiates | 0 | | ||
- | | Ssl_finished_connects | ||
- | | Threads_connected | ||
- | +--------------------------+-------+ | ||
- | 7 rows in set (0.00 sec) | ||
- | </ | ||
- | |||
- | Pay attention to the data " | ||
- | |||
- | ===== What are the maximum connections that mysql can have ===== | ||
- | |||
- | < | ||
- | show variables like " | ||
- | </ | ||
- | |||
- | ===== What are the maximum timeout that a connection will be kept open ===== | ||
- | |||
- | < | ||
- | mysql> show variables like ' | ||
- | +----------------------------+----------+ | ||
- | | Variable_name | ||
- | +----------------------------+----------+ | ||
- | | connect_timeout | ||
- | | delayed_insert_timeout | ||
- | | innodb_lock_wait_timeout | ||
- | | innodb_rollback_on_timeout | OFF | | ||
- | | interactive_timeout | ||
- | | lock_wait_timeout | ||
- | | net_read_timeout | ||
- | | net_write_timeout | ||
- | | slave_net_timeout | ||
- | | wait_timeout | ||
- | +----------------------------+----------+ | ||
- | 10 rows in set (0.00 sec) | ||
- | </ | ||
- | |||
- | ===== Maybe c3p0 has the solution ===== | ||
- | |||
- | Eventually I've implemented a configuration in the connection pooling mechanism to: | ||
- | |||
- | * verify the connection when it enters into the pool | ||
- | * put a timeout to this connection, releasing it after this period | ||
- | |||
- | This will prevent the case when a connection is held but the JDBC driver drops out. | ||
- | |||
- | My config parameters: | ||
- | |||
- | <code xml> | ||
- | < | ||
- | < | ||
- | < | ||
- | <!-- good for mysql. For oracle, select * from dual could be good enough --> | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | And where I've taken them: | ||
- | |||
- | http:// | ||
- | |||
- | |||
- | |||
mysql/problemresolution.1374594645.txt.gz · Last modified: 2022/12/02 21:02 (external edit)