SRM:import-properties 任务具有以下错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

Résumé: 如果由于 apg 数据库负载过重导致 import-porperties 任务在套接字超时时持续失败,则可能会增加 socketTimeout。

Cet article concerne Cet article ne concerne pas Cet article n’est associé à aucun produit spécifique. Toutes les versions du produit ne sont pas identifiées dans cet article.

Symptômes

导入属性任务在连接到 apg 数据库时出现以下错误:
160627 07:07:57 : com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
160627 07:07:57 :
160627 07:07:57 : The last packet successfully received from the server was 180,025 milliseconds ago. The last packet sent successfully to the server was 180,025 milliseconds ago.

异常的原因是:
aused by: java.net.SocketTimeoutException:读取超时

在这种特殊情况下,在 APG/Web-Servers/Tomcat/Default/conf/server.xml 中为每个数据库设置的 socketTimeout 设置为 180000 毫秒。

Cause

socketTimeout 将在 import-properties 任务中使用,以等待从data_property表中提取数据。如果由于当时数据库负载过重而超过了此时间,则任务将失败。

Résolution

我们可以将 APG/Web-Servers/Tomcat/Default/conf/server.xml 文件中的 socketTimeout 设置增加到 5 分钟(300000 毫秒),如下所示:
<!-- Defines the connection to the APG timeseries database for MySQL. -->
	<Resource name="jdbc/APG-DB" auth="Container" type="javax.sql.DataSource" maxActive="20" maxIdle="20" validationQuery="SELECT 1" testOnBorrow="false" testWhileIdle="true" validationQueryTimeout="5" timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis="60000" maxWait="30000" username="apg" password="watch4net" driverClassName="com.mysql.jdbc.Driver" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" url="jdbc:mysql://<db hostname>:53306/apg?autoReconnect=true&socketTimeout=300000"/>
 

Produits concernés

SRM
Propriétés de l’article
Numéro d’article: 000059197
Type d’article: Solution
Dernière modification: 29 juil. 2025
Version:  4
Trouvez des réponses à vos questions auprès d’autres utilisateurs Dell
Services de support
Vérifiez si votre appareil est couvert par les services de support.