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 will appreciate if someone can help us as we think our server admin has no clue. We are having issues with our server such as mysql using too much CPU sometimes up to 70%. Especially when security metrics scan our server. The website is slowing down and also getting errors like below. I've provide all information and if I'm missing anything please ask me.

Error:

#SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Trace:

#0 /home/widda/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/widda/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(313): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/widda/public_html/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/widda/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/widda/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /home/widda/public_html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#12 /home/widda/public_html/app/code/core/Mage/Core/Model/Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#13 /home/widda/public_html/app/code/core/Mage/Core/Model/Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#14 /home/widda/public_html/app/Mage.php(490): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#15 /home/widda/public_html/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#16 /home/widda/public_html/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#17 /home/widda/public_html/app/code/core/Mage/Core/Model/App.php(608): Mage_Core_Model_Abstract->getCollection()
#18 /home/widda/public_html/app/code/core/Mage/Core/Model/App.php(466): Mage_Core_Model_App->_initStores()
#19 /home/widda/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#20 /home/widda/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/widda/public_html/index.php(87): Mage::run('', 'store')
#22 {main}

MAGENTO DETAILS

VERSION 1.7.0.2

2 WEBSITES running on sepereate magento installation

4 admin daily on both installation

PRODUCTS: 10k products and all have custom options (8.500 and 1.500 on two installation)

DAILY VISITOR: 10K but this will triple during xmas shopping

Have full page cache extension

Have cache prewarmer crawler setup to crawl with 8 concurrent connections

SERVER SPEC:

Linux

Apache/2.2.24 (Unix)

Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz

24 CPUs

32 GB MEM

MySQL Version 5.1.70

ngnix installed and reverse proxy in use

Current Disk Usage

Filesystem Size Used Avail Use% Mounted on

/dev/sda5             6.9G  630M  6.0G  10% /
tmpfs                  16G  4.0K   16G   1% /dev/shm
/dev/sda7             879G   35G  800G   5% /home
/dev/sda6             2.0G   75M  1.8G   4% /tmp
/dev/sda1              20G   11G  8.7G  54% /usr
/dev/sda2              20G  7.4G   12G  40% /var

APACHE CONFIGURATION:

SSL Cipher Suite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH PCI recommended

Trace Enable OFF

Server Signature Off

Server Tokens ProductOnly

File ETag none

Directory “/” Options

- ExecCGI default

- FollowSymLinks default

- IncludesNOEXEC default

- Indexes default

- SymLinksIfOwnerMatch default

Start Servers 100

Minimum Spare Servers 100

Maximum Spare Servers 150

Server Limit 3000

Max Clients 1500

Max Requests Per Child 30000

Keep-Alive On

Keep-Alive Timeout 15

Max Keep-Alive Requests Unlimited

Timeout 300

MY.CNF SETTINGS CURRENTLY:

[mysqld]

skip-networking

open_files_limit=20000

key_buffer=100M

max_allowed_packet=256M

thread_stack=128K

thread_cache_size=8

table_cache=4064

thread_concurrency=8

sort_buffer_size=512M

read_buffer_size=4M

read_rnd_buffer_size=2M

myisam_sort_buffer_size=256M

tmp_table_size=512M

query_cache_size=50M

query_cache_type=1

thread_cache_size=8

wait_timeout=300

max_connections=500

interactive_timeout=20

connect_timeout=300

innodb_buffer_pool_size = 6G

innodb_additional_mem_pool_size = 20M

innodb_lock_wait_timeout = 600

innodb_file_per_table=1

#long_query_time=1

#log-slow-queries=/var/log/mysql/log-slow-queries.log

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

Thank you for looking into this.

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.