Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

As the traffic increased my website hangs quite regularly. The page visit is now averaging 50k per day.

The static page loads fine, but when the page has mysql request it takes too much time to respond. If I restarts the mysql, it will work normal for some time, say 1 hr and the response time starts to get worst.

What could be the issue?

I am not good at server side. Any help is appreciated.

My server configuration are given below.

RHEL 5.8 x64
CPU 2 cores
RAM 4GB
HDD 2GB
Apache 2.2
PHP 5.1
MySQL 5.0

Do I need to upgrade my system. How many max connection can this configuration support.

I user php with codignator, with db configuration

$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
share|improve this question

closed as too localized by Su', John Conde Feb 18 '13 at 2:12

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
2GB of hard drive space? sounds like a VPS. Sounds like it might be running out of ram and since it only has 2gb hdd unless you mean 20gb it has 0 swap (Many VPS providers have a non swap policy so when it reaches full up on ram halts can happen). Can you provide more details such as a copy and paste of running top (After a hour and once the halts to start to incur) –  bybe Feb 17 '13 at 20:55
1  
Maybe somebody on serverfault.com could answer this type of question better. –  Stephen Ostermiller Feb 17 '13 at 22:48
add comment

Browse other questions tagged or ask your own question.