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'm currently moving a joomla website from a shared host to a dedicated one.

The problem I'm facing it's that I'm experiencing slow page loading and I think it has something to do with mysql. I tell you because sometimes (3 times since yesterday :S) mysql daemon goes down and I have to put it online again (log in /var/log/mysql/ doesn't report anything. Don't know why).

I turned on slow querys log and it reports this:

/usr/sbin/mysqld, Version: 5.5.35-0+wheezy1-log ((Debian)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
# Time: 140213 15:42:22
# User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
# Query_time: 5.542592  Lock_time: 0.000729 Rows_sent: 0  Rows_examined: 643
SET timestamp=1392302542;
select count(*) into @discard from `information_schema`.`PARTITIONS`;
/usr/sbin/mysqld, Version: 5.5.35-0+wheezy1-log ((Debian)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
# Time: 140213 15:46:52
# User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
# Query_time: 3.404442  Lock_time: 0.000656 Rows_sent: 0  Rows_examined: 643
SET timestamp=1392302812;
select count(*) into @discard from `information_schema`.`PARTITIONS`;
/usr/sbin/mysqld, Version: 5.5.35-0+wheezy1-log ((Debian)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
# Time: 140213 15:53:23
# User@Host: kool2B[kool2B] @ localhost []
# Query_time: 3.020636  Lock_time: 0.000340 Rows_sent: 5  Rows_examined: 4868
use kool2Bdb;
SET timestamp=1392303203;
SELECT i.id, i.catid, i.alias, i.modified, i.publish_down, c.alias AS categoryalias , c.name AS categoryname, i.title, i.introtext, i.fulltext
 FROM w0nmk_k2_items AS i
 INNER JOIN w0nmk_k2_categories c ON c.id = i.catid
 INNER JOIN w0nmk_k2_tags_xref tr ON tr.itemID = i.id
 AND tr.tagID IN (SELECT tagID FROM w0nmk_k2_tags_xref WHERE itemID = '5199')
 WHERE i.published = 1 AND c.published = 1
 AND (i.publish_down > CURDATE() OR i.publish_down = '0000-00-00 00:00:00')
 AND i.id <> 5199  AND i.catid IN(149,150,151,152,153,154,155,156,159,160,161,163,164,167,165,138,139,142,143,213)
 GROUP BY i.id
 LIMIT 0, 5;
# Time: 140213 15:56:34
# User@Host: kool2B[kool2B] @ localhost []
# Query_time: 3.612114  Lock_time: 0.000392 Rows_sent: 5  Rows_examined: 5865
SET timestamp=1392303394;
SELECT i.id, i.catid, i.alias, i.modified, i.publish_down, c.alias AS categoryalias , c.name AS categoryname, i.title, i.introtext, i.fulltext
 FROM w0nmk_k2_items AS i
 INNER JOIN w0nmk_k2_categories c ON c.id = i.catid
 INNER JOIN w0nmk_k2_tags_xref tr ON tr.itemID = i.id
 AND tr.tagID IN (SELECT tagID FROM w0nmk_k2_tags_xref WHERE itemID = '5275')
 WHERE i.published = 1 AND c.published = 1
 AND (i.publish_down > CURDATE() OR i.publish_down = '0000-00-00 00:00:00')
 AND i.id <> 5275  AND i.catid IN(149,150,151,152,153,154,155,156,159,160,161,163,164,167,165,138,139,142,143,213)
 GROUP BY i.id
 LIMIT 0, 5;

Do you think it's normal to have this times with this server?

Atom 1.6 GHz+ with 2 GB of RAM

Here's my.cnf file:

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

[mysqld_safe]
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
skip-external-locking
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
myisam-recover         = BACKUP
query_cache_limit       = 1M
query_cache_size        = 16M
expire_logs_days        = 10
max_binlog_size         = 100M

[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M

Hope someone can give me a hand with this. Thanks.

share|improve this question
    
If I was you I'd start off by fixing logging. That is what tells you what's wrong with MySQL. Anything else is a stab in the dark. –  yoonix Feb 13 at 20:08

1 Answer 1

Well I've finally found that there was a component installed in joomla which had a security issue and a hacker used it to kill Apache. So there weren't any problems with mysql.

I've found it looking at apache logs. Well, thanks anyway!!

Regards

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.