MySQL remote connection slowProblem running mysql client, cannot connect to mysql serverConnecting to a new...
Balance Issues for a Custom Sorcerer Variant
Avoiding estate tax by giving multiple gifts
Increase performance creating Mandelbrot set in python
Anatomically Correct Strange Women In Ponds Distributing Swords
What is the difference between "behavior" and "behaviour"?
How to safely derail a train during transit?
Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?
Short story about space worker geeks who zone out by 'listening' to radiation from stars
Why are there no referendums in the US?
How to run a prison with the smallest amount of guards?
Method to test if a number is a perfect power?
You cannot touch me, but I can touch you, who am I?
How easy is it to start Magic from scratch?
Why escape if the_content isnt?
Term for the "extreme-extension" version of a straw man fallacy?
What is the intuitive meaning of having a linear relationship between the logs of two variables?
What is the best translation for "slot" in the context of multiplayer video games?
Class Action - which options I have?
Customer Requests (Sometimes) Drive Me Bonkers!
Failed to fetch jessie backports repository
How to Reset Passwords on Multiple Websites Easily?
Detecting if an element is found inside a container
Is `x >> pure y` equivalent to `liftM (const y) x`
How do we know the LHC results are robust?
MySQL remote connection slow
Problem running mysql client, cannot connect to mysql serverConnecting to a new MySQL instanceMysql server installationMySQL keeps crashing OS server.. Please help adjust my.ini!MySQL 5.1.49 freezing every two daysMySQL 5.0 upgrade issuesmysql always using maximum connectionmysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effectCentos MySQL optimization 4gb ramMysql stops with no visible reason
As the traffic keeps growing on my e-commerce(PrestaShop) and the navigation starts being slow I decided to after reading many posts in here separate my web server from my DB server.
I did set up a MySQL remote connection.
Both of the servers are on the same datacenter and have less than 1ms ping between each other.
When I switch DB to the new remote server, everything is extremely slow,
I did skip-name-resolve in my.cnf config but nothing noticeable changed at all.
any action on the website takes over 10s to load
What am I missing? Is it because of PrestaShop?
How can I improve my server availability then? Should I just load balancer between servers with web and DB in the same box?
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#skip_name_resolve
skip-name-resolve
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# chroot = /var/lib/mysql/
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
I am not getting any packet loss between the servers.
How could I properly investigate and find the causes of this slowness?
My servers both on Debian 8:
CPU: Intel 2x Xeon E5-2630v3 - 16c/32t - 2,4GHz /3,2GHz
RAM: 128Go DDR4 ECC 1866 MHz
Disques: SoftRaid 2x2To SSD
linux mysql debian
add a comment |
As the traffic keeps growing on my e-commerce(PrestaShop) and the navigation starts being slow I decided to after reading many posts in here separate my web server from my DB server.
I did set up a MySQL remote connection.
Both of the servers are on the same datacenter and have less than 1ms ping between each other.
When I switch DB to the new remote server, everything is extremely slow,
I did skip-name-resolve in my.cnf config but nothing noticeable changed at all.
any action on the website takes over 10s to load
What am I missing? Is it because of PrestaShop?
How can I improve my server availability then? Should I just load balancer between servers with web and DB in the same box?
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#skip_name_resolve
skip-name-resolve
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# chroot = /var/lib/mysql/
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
I am not getting any packet loss between the servers.
How could I properly investigate and find the causes of this slowness?
My servers both on Debian 8:
CPU: Intel 2x Xeon E5-2630v3 - 16c/32t - 2,4GHz /3,2GHz
RAM: 128Go DDR4 ECC 1866 MHz
Disques: SoftRaid 2x2To SSD
linux mysql debian
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18
add a comment |
As the traffic keeps growing on my e-commerce(PrestaShop) and the navigation starts being slow I decided to after reading many posts in here separate my web server from my DB server.
I did set up a MySQL remote connection.
Both of the servers are on the same datacenter and have less than 1ms ping between each other.
When I switch DB to the new remote server, everything is extremely slow,
I did skip-name-resolve in my.cnf config but nothing noticeable changed at all.
any action on the website takes over 10s to load
What am I missing? Is it because of PrestaShop?
How can I improve my server availability then? Should I just load balancer between servers with web and DB in the same box?
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#skip_name_resolve
skip-name-resolve
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# chroot = /var/lib/mysql/
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
I am not getting any packet loss between the servers.
How could I properly investigate and find the causes of this slowness?
My servers both on Debian 8:
CPU: Intel 2x Xeon E5-2630v3 - 16c/32t - 2,4GHz /3,2GHz
RAM: 128Go DDR4 ECC 1866 MHz
Disques: SoftRaid 2x2To SSD
linux mysql debian
As the traffic keeps growing on my e-commerce(PrestaShop) and the navigation starts being slow I decided to after reading many posts in here separate my web server from my DB server.
I did set up a MySQL remote connection.
Both of the servers are on the same datacenter and have less than 1ms ping between each other.
When I switch DB to the new remote server, everything is extremely slow,
I did skip-name-resolve in my.cnf config but nothing noticeable changed at all.
any action on the website takes over 10s to load
What am I missing? Is it because of PrestaShop?
How can I improve my server availability then? Should I just load balancer between servers with web and DB in the same box?
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#skip_name_resolve
skip-name-resolve
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# chroot = /var/lib/mysql/
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
I am not getting any packet loss between the servers.
How could I properly investigate and find the causes of this slowness?
My servers both on Debian 8:
CPU: Intel 2x Xeon E5-2630v3 - 16c/32t - 2,4GHz /3,2GHz
RAM: 128Go DDR4 ECC 1866 MHz
Disques: SoftRaid 2x2To SSD
linux mysql debian
linux mysql debian
edited Oct 10 '18 at 15:58
Daniel Gordi
846
846
asked Oct 10 '18 at 11:29
ChrisChris
113
113
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18
add a comment |
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18
add a comment |
4 Answers
4
active
oldest
votes
Try run a MySQL query manually from your Application server to Database server with mysql command like this and determine how it will takes to run:
time mysql -u'username' -p'password' -e'show status'
Also, Make sure there is no limitation such as Firewall rules for network rate limit.
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
add a comment |
First of all check settings, if you sure that there no network bottlenecks.
If second server it's fresh installation so possibly nobody adjust settings on this server.
Secondary you can get good results if you have separated traffic.
As example:
interfaceA of web server connected directly to the DB server interface
interfaceB of web server used for processing web requests
add a comment |
There's no clear answer to your question since there's just not enough information. However, instead of focusing on the network as the root cause of your problem, I'd rather investigate MySQL configuration on the new server. Usually, it's in /etc/mysql/my.cnf (or similar). Compare both versions of the old and the new installation. Maybe you need to increase the connection pool or something?
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
add a comment |
Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html
When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell status command shows whether or not compression is enabled for the session.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f934827%2fmysql-remote-connection-slow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try run a MySQL query manually from your Application server to Database server with mysql command like this and determine how it will takes to run:
time mysql -u'username' -p'password' -e'show status'
Also, Make sure there is no limitation such as Firewall rules for network rate limit.
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
add a comment |
Try run a MySQL query manually from your Application server to Database server with mysql command like this and determine how it will takes to run:
time mysql -u'username' -p'password' -e'show status'
Also, Make sure there is no limitation such as Firewall rules for network rate limit.
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
add a comment |
Try run a MySQL query manually from your Application server to Database server with mysql command like this and determine how it will takes to run:
time mysql -u'username' -p'password' -e'show status'
Also, Make sure there is no limitation such as Firewall rules for network rate limit.
Try run a MySQL query manually from your Application server to Database server with mysql command like this and determine how it will takes to run:
time mysql -u'username' -p'password' -e'show status'
Also, Make sure there is no limitation such as Firewall rules for network rate limit.
answered Oct 10 '18 at 12:01
Daniel GordiDaniel Gordi
846
846
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
add a comment |
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
This is the results I am getting : real 0m0.015s user 0m0.004s sys 0m0.000s
– Chris
Oct 10 '18 at 12:54
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
So there is no latency or connection issue between your two servers. Try to optimize my.cnf / MySQL Configuration with Wizards or Best Practices such as Percona Configuration Tool Wizard.
– Daniel Gordi
Oct 10 '18 at 13:27
add a comment |
First of all check settings, if you sure that there no network bottlenecks.
If second server it's fresh installation so possibly nobody adjust settings on this server.
Secondary you can get good results if you have separated traffic.
As example:
interfaceA of web server connected directly to the DB server interface
interfaceB of web server used for processing web requests
add a comment |
First of all check settings, if you sure that there no network bottlenecks.
If second server it's fresh installation so possibly nobody adjust settings on this server.
Secondary you can get good results if you have separated traffic.
As example:
interfaceA of web server connected directly to the DB server interface
interfaceB of web server used for processing web requests
add a comment |
First of all check settings, if you sure that there no network bottlenecks.
If second server it's fresh installation so possibly nobody adjust settings on this server.
Secondary you can get good results if you have separated traffic.
As example:
interfaceA of web server connected directly to the DB server interface
interfaceB of web server used for processing web requests
First of all check settings, if you sure that there no network bottlenecks.
If second server it's fresh installation so possibly nobody adjust settings on this server.
Secondary you can get good results if you have separated traffic.
As example:
interfaceA of web server connected directly to the DB server interface
interfaceB of web server used for processing web requests
answered Oct 10 '18 at 12:12
Ivan GurzhiyIvan Gurzhiy
961
961
add a comment |
add a comment |
There's no clear answer to your question since there's just not enough information. However, instead of focusing on the network as the root cause of your problem, I'd rather investigate MySQL configuration on the new server. Usually, it's in /etc/mysql/my.cnf (or similar). Compare both versions of the old and the new installation. Maybe you need to increase the connection pool or something?
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
add a comment |
There's no clear answer to your question since there's just not enough information. However, instead of focusing on the network as the root cause of your problem, I'd rather investigate MySQL configuration on the new server. Usually, it's in /etc/mysql/my.cnf (or similar). Compare both versions of the old and the new installation. Maybe you need to increase the connection pool or something?
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
add a comment |
There's no clear answer to your question since there's just not enough information. However, instead of focusing on the network as the root cause of your problem, I'd rather investigate MySQL configuration on the new server. Usually, it's in /etc/mysql/my.cnf (or similar). Compare both versions of the old and the new installation. Maybe you need to increase the connection pool or something?
There's no clear answer to your question since there's just not enough information. However, instead of focusing on the network as the root cause of your problem, I'd rather investigate MySQL configuration on the new server. Usually, it's in /etc/mysql/my.cnf (or similar). Compare both versions of the old and the new installation. Maybe you need to increase the connection pool or something?
answered Oct 10 '18 at 12:27
claaszclaasz
375210
375210
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
add a comment |
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
I understand, I edited my question and added my my.cnf.
– Chris
Oct 10 '18 at 12:52
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
@chris On Oct 15 and Nov 10, we have asked for additional information to try to help you improve your response time. Until you post the data, we do not know. Tuning is a very intense subject that can not be supported with ONE QUESTION and ONE ANSWER.
– Wilson Hauck
Nov 20 '18 at 22:21
add a comment |
Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html
When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell status command shows whether or not compression is enabled for the session.
add a comment |
Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html
When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell status command shows whether or not compression is enabled for the session.
add a comment |
Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html
When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell status command shows whether or not compression is enabled for the session.
Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html
When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell status command shows whether or not compression is enabled for the session.
answered 5 mins ago
David FearDavid Fear
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f934827%2fmysql-remote-connection-slow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Oct 15 '18 at 23:44
2nd request. From YOUR new SERVER, Additional information request, please. Post on pastebin.com or here. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, df -h for a linux/unix free space list by device, for server tuning analysis.
– Wilson Hauck
Nov 10 '18 at 20:28
Please consider posting data requested Nov 10 to allow Suggestions specific to YOUR new SERVER to be provided after analysis of the data only YOU can post for us to analyze. You are probably asking yourself why should I post anything. There are more than 300 GLOBAL STATUS and more than 300 GLOBAL VARIABLES that determine in large part how your MySQL will perform. Consider the following link to a Review posted by one of my customers, instagram.com/p/BqicW3Hn_5Y then work with us, please.
– Wilson Hauck
Dec 23 '18 at 19:18