MySQL Forums
Forum List  »  Install & Repo

10 minutes delay in executing the first query from some ips
Posted by: Antonio BM
Date: September 11, 2015 04:14AM

I have installed mysql server 5.6.25 in debian 7 server.
When I connect from some external ips, I have 10 minutes delay in executing the first query. Then I can run any query and have no extra delay. Only it applies to the first query and from some ips.
I try adding skip-host-cache and skip-name-resolve to my.cnf, but not fix.
Reverse-Dns problem could be?
I could modify the host and resolve.cnf file from server.
Any suggestions?
Thanks in advance.

These are log and my.cnf file

150911 9:41:20 165 Connect dx_@85.XX.XX.XX on database_name
165 Query /* mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'init_connect'
165 Query SHOW COLLATION
165 Query SET NAMES latin1
165 Query SET character_set_results = NULL
165 Query SET autocommit=1
165 Query SELECT curdate() AS fecha, curtime() AS hora

150911 9:50:32 165 Query SELECT * FROM lval WHERE tipo = 'VERSION'

MY.CNF

[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
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
explicit_defaults_for_timestamp

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1

log-error = /var/log/mysql/error.log

# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

#Cambios mios
[mysqld]
skip-host-cache
skip-name-resolve

net_read_timeout=600
net_write_timeout=900

key_buffer_size = 512M
max_allowed_packet = 1024M
thread_stack = 256K
thread_cache_size = 30

max_connections = 300

wait_timeout=86400
interactive_timeout=86400

max_connect_errors = 1000000

query_cache_limit = 128M
query_cache_size = 1024M

general_log_file = /var/log/mysql/mysql.log
general_log = 1
log_warnings = 1
long_query_time = 5
#log-queries-not-using-indexes
expire_logs_days = 10
max_binlog_size = 100M

[mysqldump]
quick
quote-names
max_allowed_packet = 1024M


# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

Options: ReplyQuote


Subject
Written By
Posted
10 minutes delay in executing the first query from some ips
September 11, 2015 04:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.