admin管理员组

文章数量:1124667

A script writes steadily data into MySQL 8x. From time to time the script fires error Error: getaddrinfo ENOTFOUND localhost:10006, what should mean, MySQL unavailable.

This error wasn't an issue as long as my script wrote data in a single thread. The error still fired, but the script didn't become unresponsive. After the script writes in multiple threads (10, 20, 100), it becomes on error unresponsive (in task manager red, status 'no response') and doesn't come alive anymore.

MySQL has nothing in logs, feeling healthy and fit.

Script is a typescript on Node, everything runs on Windows VM.There is no connection pool, the script just establishes a direct connection (host/name...).

What are ways to debug and fix this? Is there something special I should consider about threaded writing into MySQL, on the script level or in MySQL configuration?

Here is myf:

[mysqld]
secure_file_priv=C:/Users/me/Downloads
event_scheduler = ON
local_infile=1
{{#unless os.windows}}
skip-name-resolve
{{/unless}}

{{#if disableMysqlx}}
mysqlx = 0
{{/if}}

datadir = {{datadir}}
port = {{port}}
bind-address = {{bindAddress}}
socket = {{socket}}

{{#if os.windows}}
console
{{/if}}

# Older PHP/client compatibility
character-set-server = utf8mb3
default_authentication_plugin = mysql_native_password

# Fine Tuning
performance_schema = off
max_allowed_packet = 1024M
thread_stack = 192K
thread_cache_size = 8

# InnoDB
innodb_buffer_pool_size = 1024M
innodb_log_file_size = 96M

[client]
{{#unless os.windows}}
socket = {{socket}}
{{else}}
host = {{clientAddress}}
port = {{port}}
{{/unless}}
user = ****
password = ****

本文标签: nodejsMySQL becomes randomly unavailableStack Overflow