From users-return-51755-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Mon Aug 19 14:12:07 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 14C74180665 for ; Mon, 19 Aug 2019 16:12:06 +0200 (CEST) Received: (qmail 66055 invoked by uid 500); 19 Aug 2019 14:12:06 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 66044 invoked by uid 99); 19 Aug 2019 14:12:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2019 14:12:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 76960C22B0 for ; Mon, 19 Aug 2019 14:12:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.071 X-Spam-Level: *** X-Spam-Status: No, score=3.071 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=0.1, URI_TRY_3LD=1.999] autolearn=disabled Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id FRUrPF25bKV3 for ; Mon, 19 Aug 2019 14:12:03 +0000 (UTC) Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=199.38.86.66; helo=n4.nabble.com; envelope-from=matt.koss@aimia.com; receiver= Received: from n4.nabble.com (n4.nabble.com [199.38.86.66]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTP id BAE667DC05 for ; Mon, 19 Aug 2019 14:12:02 +0000 (UTC) Received: from n4.nabble.com (localhost [127.0.0.1]) by n4.nabble.com (Postfix) with ESMTP id B235BB175912 for ; Mon, 19 Aug 2019 09:12:01 -0500 (CDT) Date: Mon, 19 Aug 2019 09:12:01 -0500 (CDT) From: mk666aim To: users@activemq.apache.org Message-ID: <1566223921580-0.post@n4.nabble.com> Subject: Artemis does not reconnect to MySQL after connection timeout MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit We're trying to use MySQL 5.7 backend for JDBC persistent store. This works fine, until the point where the connection goes stale due to the server timeout. This is our current set up in broker.xml: jdbc:mysql://xxx:3306/artemis_datasource?create=true&user=mq_admin&password=abcd&useSSL=false&autoReconnect=true&tcpKeepAlive=true&autoReconnectForPools=true BINDINGS_TABLE MESSAGE_TABLE P_MSG_TBL LARGE_MESSAGES_TABLE NODE_MANAGER_TABLE com.mysql.cj.jdbc.Driver MySQL default setting of the *wait_timeout* parameter is 8 hours. We are not able to get Artemis to reconnect again after this timeout is reached and we were forced to set up a cron-triggered restart to mitigate this. Error that we get is as follows: *The last packet successfully received from the server was 43417 seconds ago.The last packet sent successfully to the server was 43417 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem * This issue is easily rectifiable in the old ActiveMQ, as this uses Spring-cofngiured datasource, e.g.: The *autoReconnect* / *autoReconnectForPools* parameters to the driver URL did not make any difference, and in addition they are not actually recommended by MySQL maintainers. -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html