From 89be0914066db85c8f516877223770514b50be97 Mon Sep 17 00:00:00 2001 From: frankw Date: Sat, 11 Oct 2008 22:43:43 +0000 Subject: [PATCH] Added MySql connect_timeout. Default is 5 sec and can make major problems on loaded systems... git-svn-id: svn://192.168.202.10@966 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/docs/BASE_INSTALL.txt | 6 ++++++ agc_2-X/trunk/docs/SCRATCH_INSTALL.txt | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/agc_2-X/trunk/docs/BASE_INSTALL.txt b/agc_2-X/trunk/docs/BASE_INSTALL.txt index ceafcecc..429ad2b1 100644 --- a/agc_2-X/trunk/docs/BASE_INSTALL.txt +++ b/agc_2-X/trunk/docs/BASE_INSTALL.txt @@ -267,6 +267,10 @@ PHASE 4: CREATING MYSQL DATABASE AND POPULATING IT we will create the database and add a few initial records so that we can use the administrative web interface. Since this is a new install it is easier to use our new mysql script file to add the tables to the database: +Make sure to use reasonable settings for mysql huge.cnf does not look as huge anymore +in light of current systems. +Plus you should increase the connect_timeout so connections do not fail on +a more loaded system. 1. at the command prompt type go to the mysql client: /usr/local/mysql/bin/mysql @@ -274,6 +278,8 @@ to use our new mysql script file to add the tables to the database: (make sure you put your IP address in place of "10.10.10.15" in the queries below) ######------ BEGIN Mysql data entry(you can copy and paste this into terminal) # +SET GLOBAL connect_timeout=60; + CREATE DATABASE `asterisk` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@'%' IDENTIFIED BY '1234'; diff --git a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index f20ea414..0f24d0ff 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt @@ -361,6 +361,8 @@ so we will need to install mysql on this machine. *REQUIRED and OPTIONAL* (only install MySQL server locally if you don't want to use an installation on another machine, Mysql client is required on all VICIDIAL servers) NOTE: a minimum of MySQL server 4.0.X is required +You should increase the connect_timeout so connections do not fail on +a more loaded system. Go to http://www.mysql.com/ and download the mysql package - to install this directly on the command line type: @@ -1756,6 +1758,11 @@ flush privileges; # NOTE: if using MySQL 4.1.12 or higher you may need to run this query too: UPDATE mysql.user set password=OLD_PASSWORD('1234') where user='cron'; +# To make sure that new processes can connect to the Database under load we should +# increase the global connect_timeout + +SET GLOBAL connect_timeout=60; + # NOTE: make sure you do NOT put any spaces or other punctuation in the # server_id, phone, extension, or user fields in the queries below if you edit them.