Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I found my PHP 5.4.20 (from remi repo) on CentOS 6.4 64-bit is loosing connection to my MariaDB 10.0.4 server each 3 hours. I use mysqlclient18 5.5.28 from atomic repo as mysql library.

MariaDB itself works fine, I'm able to login to it via phpMyAdmin from control panel using different PHP version and server port.

My php.ini config is as follows:

;;; begin content - please not remove this line


[PHP]
;### MR -- generic (the same on all php 5.x version)
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
unserialize_callback_func=
allow_call_time_pass_reference = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_classes =
expose_php = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
;error_reporting = E_ALL
display_startup_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
report_memleaks = On
track_errors = Off
variables_order = "EGPCS"
gpc_order = "GPC"
include_path = ".:/usr/share/pear/"
doc_root =
user_dir =
extension_dir = /usr/lib/php/modules
upload_tmp_dir = /tmp/
default_socket_timeout = 60
date.timezone = "Europe/Warsaw"

cgi.fix_pathinfo=1

;### MR -- specific for php 5.3+
auto_globals_jit = On
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
unserialize_callback_func =
output_buffering = 4096
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
auto_append_file =

;### MR -- custom setting (handle by kloxo)
disable_functions = shell_exec
register_globals = off
display_errors = on
file_uploads = on
upload_max_filesize = 256M
log_errors = off
error_log = /var/log/php_error.log
output_buffering = off
register_argc_argv = on
magic_quotes_gpc = off
post_max_size = 128M
magic_quotes_runtime = off
magic_quotes_sybase = off
mysql.allow_persistent = off
max_execution_time = 600
max_input_time = -1
memory_limit = 256M
post_max_size = 128M
allow_url_fopen = on
allow_url_include = on
session.save_path = /dev/shm/session
cgi.force_redirect = on
;sendmail_from = 
safe_mode = off
enable_dl = on

;### MR -- deprecated/disabled on php 5.3+
;register_long_arrays = off

[Syslog]
define_syslog_variables = Off

[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i

[Java]

[SQL]
sql.safe_mode = Off

[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1 

[MySQL]
mysql.default_port = 3306 
mysql.default_socket = /var/lib/mysql/mysql.sock
mysql.default_host = localhost
mysql.default_user = 
mysql.default_password = 
mysql.connect_timeout = 60
mysql.trace_mode = Off

[mSQL]
msql.max_persistent = -1
msql.max_links = -1

[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off

[Sybase-CT]
sybct.allow_persistent = On
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10

[dbx]
dbx.colnames_case = "lowercase"

[bcmath]
bcmath.scale = 0

[browscap]
;browscap = extra/browscap.ini

[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0

[Session]
session.save_handler = files
session.save_path = /var/lib/php/session
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off

[Assertion]

[Ingres II]
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
ingres.default_database =
ingres.default_user =
ingres.default_password =

[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30

[Sockets]
sockets.use_system_read = On

[com]

[Printer]

[mbstring]

[FrontBase]

[Crack]

[exif]

;### MR -- exist on php 5.3+
[CLI Server]
cli_server.color = On

[Date]

[filter]

[iconv]

[intl]

[sqlite]

[sqlite3]

[Pcre]

[Pdo]

[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=

[Phar]

[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"

[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port = 3306
mysql.default_socket = /var/lib/mysql/mysql.sock
mysql.default_host = localhost
mysql.default_user =  
mysql.default_password = 
mysql.connect_timeout = 60
mysql.trace_mode = On

[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket = /var/lib/mysql/mysql.sock
mysqli.default_host = localhost
mysqli.default_user =
mysqli.default_pw = 
mysqli.reconnect = On

[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off

[OCI8]

[Tidy]
tidy.clean_output = Off

[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5

[sysvshm]

[ldap]
ldap.max_links = -1

[mcrypt]

[dba]

zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_5.4.so
zend_extension=/usr/lib64/php/modules/ixed.5.4.lin
zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so

;;; end content - please not remove this line
share|improve this question
    
It's this: Warning: mysqli_connect(): (HY000/1129): Host '144.76.xx.xx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in –  Spacedust Oct 11 '13 at 21:16

1 Answer 1

up vote 1 down vote accepted

Changed:

max_connect_errors=100

to

max_connect_errors=5000

which fixed the problem ;)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.