pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

MySQL problem. ERROR 2002 (HY000)

Sat Jan 05, 2013 9:59 pm

Hi

I have problem with mysql.

When it's freshly after instalation it seems to run 'ok' but after some time i can't connect to database.

Code: Select all

pi@raspi ~ $ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
all I can do is reinstall MySQL but the problem will appear again ;(

Code: Select all

sudo apt-get remove mysql-server php5-mysql
sudo apt-get autoremove
sudo apt-get install mysql-server php5-mysql
does anyone know how to solve this so that it will not appear again?

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 10:27 am

The first thing to check is whether the sql server process is still running or not. Type "ps ax" and look for a mysqld process:

Code: Select all

$ ps ax | grep sql
...
 1511 ?        Ssl  375:34 /usr/sbin/mysqld
If there is not, you need to figure out why not. Look under /var/log for files relating to mysql and see if they give any clues. If the msyqld server is still running you need to figure out why it is no longer accepting connections; does that mysqld.sock file still exist on the file system, are there any clues in the logfiles, etc?

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 4:53 pm

Code: Select all

pi@raspi ~ $ ps ax | grep sql
16008 pts/1    S+     0:00 grep --color=auto sql
pi@raspi ~ $ service mysql status
[info] MySQL is stopped..
it seems like mysql stops itself ;(

/var/log/mysql.log
/var/log/mysql.err
/var/log/mysql

files are empty, and folder doesn't have any files in it ;(

So logs will not give me much info ;/

*.sock file does not exist.


Now i get different info. There is free memory on my card. 1.5Gb - 49% free space

Code: Select all

pi@raspi ~ $ service mysql start
df: `/var/lib/mysql/.': Permission denied
df: no file systems processed
[....] /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! [FA failed!
pi@raspi ~ $ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

doobedoobedo
Posts: 36
Joined: Sun Aug 28, 2011 11:03 pm

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 4:56 pm

try 'sudo service mysql start' pi user doesn't have permission to start services.

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 9:03 pm

Code: Select all

pi@raspi ~ $ sudo service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

simonpb1
Posts: 25
Joined: Thu Sep 13, 2012 11:25 am

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 9:29 pm

have you run out of space on the SD card,

try running df -h on the command prompt.

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: MySQL problem. ERROR 2002 (HY000)

Sun Jan 06, 2013 9:41 pm

I see the startup script, /etc/init.d/mysql, has this:

Code: Select all

ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
which might well mean you'll find errors logged to /var/log/syslog, or /var/log/daemon.log.

Also if that startup script actually gets as far as trying to start mysqld, it does this:

Code: Select all

/usr/bin/mysqld_safe > /dev/null 2>&1 &
which kind of sucks because any error output from mysqld would not be seen.

I'd temporarily edit that line to be

Code: Select all

/usr/bin/mysqld_safe &
then try to start the service again; maybe you'll get more clues.

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 7:47 am

simonpb1 wrote:have you run out of space on the SD card,

try running df -h on the command prompt.

Code: Select all

pi@lech ~ $ sudo df -h
System plików  size used avi. %used mouted  **
rootfs          3,6G  1,7G  1,8G  48% /
**i have it in polish, hope i've tranlsated it properly.

rgh wrote:I see the startup script, /etc/init.d/mysql, has this:

Code: Select all

ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
which might well mean you'll find errors logged to /var/log/syslog, or /var/log/daemon.log.

Also if that startup script actually gets as far as trying to start mysqld, it does this:

Code: Select all

/usr/bin/mysqld_safe > /dev/null 2>&1 &
which kind of sucks because any error output from mysqld would not be seen.

I'd temporarily edit that line to be

Code: Select all

/usr/bin/mysqld_safe &
then try to start the service again; maybe you'll get more clues.

Code: Select all

pi@lech ~ $ /usr/bin/mysqld_safe > /dev/null 2>&1 &
[1] 19782
pi@lech ~ $ sudo service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
[1]+  Done                    /usr/bin/mysqld_safe > /dev/null 2>&1
pi@lech ~ $ /usr/bin/mysqld_safe > /dev/null 2>&1 &
[1] 21183
pi@lech ~ $ /usr/bin/mysqld_safe &
[2] 21766
[1]   Done                    /usr/bin/mysqld_safe > /dev/null 2>&1
pi@lech ~ $ 130107 08:22:13 mysqld_safe Logging to syslog.
130107 08:22:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130107 08:22:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
^C
[2]+  Done                    /usr/bin/mysqld_safe

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 8:57 am

That's a bit hard to follow... note you should only try to run one instance of mysqld at a time, so it's hard to know if some of the four mysqld's you tried to start there failed due to some other instance running. In the middle of that lot there are a few lines that tell me mysqld_safe started a mysqld process which exited almost immediately.

Was anything helpful logged in /var/log/syslog or /var/log/daemon.log?

mysqld_safe is a shell script, that starts the actual mysqld. If there are still no clues in the various mysqld and syslog logfiles, my next step would be to edit the mysqld_safe script to invoke mysqld under strace so I could see what it did up to the point where it exits - maybe that'd show it trying to create a file and failing, or something.

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 9:58 am

I've reinstalled mysql so i can give logs

Code: Select all

pi@lech ~ $ sudo service mysql status
[info] /usr/bin/mysqladmin  Ver 8.42 Distrib 5.5.28, for debian-linux-gnu on armv7l
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.5.28-1
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 1 hour 47 min 54 sec

Threads: 1  Questions: 402  Slow queries: 0  Opens: 44  Flush tables: 1  Open tables: 37  Queries per second avg: 0.062.
pi@lech ~ $ sudo service mysql status
[info] /usr/bin/mysqladmin  Ver 8.42 Distrib 5.5.28, for debian-linux-gnu on armv7l
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.5.28-1
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 1 hour 48 min 55 sec

Threads: 9  Questions: 524  Slow queries: 0  Opens: 44  Flush tables: 1  Open tables: 37  Queries per second avg: 0.080.
It died 1-2minutes later.
I had heavy lag on console - couldn''t type. server seemed to use a lot of CPU


here are logs from /var/log/daemon.log

Code: Select all

Jan  7 08:36:16 lech mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 [Note] Plugin 'FEDERATED' is disabled.
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: The InnoDB memory heap is disabled
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Compressed tables use zlib 1.2.7
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Using Linux native AIO
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Initializing buffer pool, size = 128.0M
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Completed initialization of buffer pool
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: highest supported file format is Barracuda.
Jan  7 08:36:16 lech mysqld: InnoDB: The log sequence number in ibdata files does not match
Jan  7 08:36:16 lech mysqld: InnoDB: the log sequence number in the ib_logfiles!
Jan  7 08:36:16 lech mysqld: 130107  8:36:16  InnoDB: Database was not shut down normally!
Jan  7 08:36:16 lech mysqld: InnoDB: Starting crash recovery.
Jan  7 08:36:16 lech mysqld: InnoDB: Reading tablespace information from the .ibd files...
Jan  7 08:36:16 lech mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Jan  7 08:36:16 lech mysqld: InnoDB: buffer...
Jan  7 08:36:17 lech mysqld: 130107  8:36:17  InnoDB: Waiting for the background threads to start
Jan  7 08:36:18 lech mysqld: 130107  8:36:18 InnoDB: 1.1.8 started; log sequence number 5774308
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Server socket created on IP: '127.0.0.1'.
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Event Scheduler: Loaded 0 events
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] /usr/sbin/mysqld: ready for connections.
Jan  7 08:36:19 lech mysqld: Version: '5.5.28-1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Jan  7 10:28:44 lech mysqld_safe: Number of processes running now: 0
Jan  7 10:28:59 lech mysqld_safe: mysqld restarted
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [Note] Plugin 'FEDERATED' is disabled.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: The InnoDB memory heap is disabled
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Compressed tables use zlib 1.2.7
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Using Linux native AIO
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Initializing buffer pool, size = 128.0M
Jan  7 10:36:02 lech mysqld: InnoDB: mmap(135987200 bytes) failed; errno 12
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Completed initialization of buffer pool
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Fatal error: cannot allocate memory for the buffer pool
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Plugin 'InnoDB' init function returned error.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Aborting
Jan  7 10:36:02 lech mysqld: 
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [Note] /usr/sbin/mysqld: Shutdown complete
Jan  7 10:36:02 lech mysqld: 
Jan  7 10:36:02 lech mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
and here /var/log/syslog

Code: Select all

Jan  7 08:36:16 lech mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 [Note] Plugin 'FEDERATED' is disabled.
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: The InnoDB memory heap is disabled
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Compressed tables use zlib 1.2.7
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Using Linux native AIO
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Initializing buffer pool, size = 128.0M
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: Completed initialization of buffer pool
Jan  7 08:36:16 lech mysqld: 130107  8:36:16 InnoDB: highest supported file format is Barracuda.
Jan  7 08:36:16 lech mysqld: InnoDB: The log sequence number in ibdata files does not match
Jan  7 08:36:16 lech mysqld: InnoDB: the log sequence number in the ib_logfiles!
Jan  7 08:36:16 lech mysqld: 130107  8:36:16  InnoDB: Database was not shut down normally!
Jan  7 08:36:16 lech mysqld: InnoDB: Starting crash recovery.
Jan  7 08:36:16 lech mysqld: InnoDB: Reading tablespace information from the .ibd files...
Jan  7 08:36:16 lech mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Jan  7 08:36:16 lech mysqld: InnoDB: buffer...
Jan  7 08:36:17 lech mysqld: 130107  8:36:17  InnoDB: Waiting for the background threads to start
Jan  7 08:36:18 lech mysqld: 130107  8:36:18 InnoDB: 1.1.8 started; log sequence number 5774308
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Server socket created on IP: '127.0.0.1'.
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] Event Scheduler: Loaded 0 events
Jan  7 08:36:19 lech mysqld: 130107  8:36:19 [Note] /usr/sbin/mysqld: ready for connections.
Jan  7 08:36:19 lech mysqld: Version: '5.5.28-1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Jan  7 08:39:01 lech /USR/SBIN/CRON[23763]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Jan  7 09:09:01 lech /USR/SBIN/CRON[23990]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Jan  7 09:17:01 lech /USR/SBIN/CRON[24012]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan  7 09:39:01 lech /USR/SBIN/CRON[24073]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Jan  7 10:09:01 lech /USR/SBIN/CRON[24106]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Jan  7 10:17:01 lech /USR/SBIN/CRON[24125]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan  7 10:27:22 lech kernel: [179543.381775] mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Jan  7 10:27:23 lech kernel: [179543.381863] [<c0013e1c>] (unwind_backtrace+0x0/0xf0) from [<c008ca08>] (dump_header.isra.14+0x70/0x18c)
Jan  7 10:27:23 lech kernel: [179543.381904] [<c008ca08>] (dump_header.isra.14+0x70/0x18c) from [<c008cca8>] (oom_kill_process.constprop.19+0x68/0x27c)
Jan  7 10:27:23 lech kernel: [179543.381938] [<c008cca8>] (oom_kill_process.constprop.19+0x68/0x27c) from [<c008d2e4>] (out_of_memory+0x270/0x344)
Jan  7 10:27:23 lech kernel: [179543.381976] [<c008d2e4>] (out_of_memory+0x270/0x344) from [<c00903e8>] (__alloc_pages_nodemask+0x600/0x630)
Jan  7 10:27:23 lech kernel: [179543.382009] [<c00903e8>] (__alloc_pages_nodemask+0x600/0x630) from [<c008bd70>] (filemap_fault+0x250/0x4a8)
Jan  7 10:27:23 lech kernel: [179543.382055] [<c008bd70>] (filemap_fault+0x250/0x4a8) from [<c00a11f4>] (__do_fault+0x68/0x4a0)
Jan  7 10:27:23 lech kernel: [179543.382111] [<c00a11f4>] (__do_fault+0x68/0x4a0) from [<c00a3cf8>] (handle_pte_fault+0x74/0x784)
Jan  7 10:27:23 lech kernel: [179543.382146] [<c00a3cf8>] (handle_pte_fault+0x74/0x784) from [<c00a44b4>] (handle_mm_fault+0xac/0xec)
Jan  7 10:27:23 lech kernel: [179543.382196] [<c00a44b4>] (handle_mm_fault+0xac/0xec) from [<c037e0e8>] (do_page_fault+0x1c0/0x36c)
Jan  7 10:27:23 lech kernel: [179543.382232] [<c037e0e8>] (do_page_fault+0x1c0/0x36c) from [<c00083c0>] (do_PrefetchAbort+0x34/0x98)
Jan  7 10:27:23 lech kernel: [179543.382277] [<c00083c0>] (do_PrefetchAbort+0x34/0x98) from [<c037cd74>] (ret_from_exception+0x0/0x10)
Jan  7 10:27:23 lech kernel: [179543.382297] Exception stack(0xcb7c1fb0 to 0xcb7c1ff8)
Jan  7 10:27:23 lech kernel: [179543.382317] 1fa0:                                     51a8658c 00000000 00000002 00000000
Jan  7 10:27:23 lech kernel: [179543.382342] 1fc0: 0000119c 000011a8 51a864c0 00000000 00000000 51a98f18 40908c58 51a98898
Jan  7 10:27:23 lech kernel: [179543.382365] 1fe0: 00000000 4c0d0360 4029a8d8 40283ed4 60000010 ffffffff
Jan  7 10:27:23 lech kernel: [179543.382379] Mem-info:
Jan  7 10:27:23 lech kernel: [179543.382389] Normal per-cpu:
Jan  7 10:27:23 lech kernel: [179543.382403] CPU    0: hi:   90, btch:  15 usd:  21
Jan  7 10:27:23 lech kernel: [179543.382442] active_anon:20218 inactive_anon:20252 isolated_anon:0
Jan  7 10:27:23 lech kernel: [179543.382450]  active_file:358 inactive_file:442 isolated_file:0
Jan  7 10:27:23 lech kernel: [179543.382458]  unevictable:0 dirty:0 writeback:1 unstable:0
Jan  7 10:27:23 lech kernel: [179543.382465]  free:2041 slab_reclaimable:531 slab_unreclaimable:1484
Jan  7 10:27:23 lech kernel: [179543.382473]  mapped:310 shmem:4 pagetables:1026 bounce:0
Jan  7 10:27:23 lech kernel: [179543.382519] Normal free:8164kB min:8192kB low:10240kB high:12288kB active_anon:80872kB inactive_anon:81008kB active_file:1432kB inactive_file:1768kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:195072kB mlocked:0kB dirty:0kB writeback:4kB mapped:1240kB shmem:16kB slab_reclaimable:2124kB slab_unreclaimable:5936kB kernel_stack:1520kB pagetables:4104kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:4646 all_unreclaimable? yes
Jan  7 10:27:23 lech kernel: [179543.382564] lowmem_reserve[]: 0 0
Jan  7 10:27:23 lech kernel: [179543.382664] Normal: 169*4kB 0*8kB 0*16kB 6*32kB 12*64kB 5*128kB 1*256kB 3*512kB 0*1024kB 0*2048kB 1*4096kB = 8164kB
Jan  7 10:27:23 lech kernel: [179543.382712] 2284 total pagecache pages
Jan  7 10:27:23 lech kernel: [179543.382723] 1480 pages in swap cache
Jan  7 10:27:23 lech kernel: [179543.382735] Swap cache stats: add 1789621, delete 1788141, find 530835/687473
Jan  7 10:27:23 lech kernel: [179543.382748] Free swap  = 0kB
Jan  7 10:27:23 lech kernel: [179543.382756] Total swap = 102396kB
Jan  7 10:27:23 lech kernel: [179543.393467] 49152 pages of RAM
Jan  7 10:27:23 lech kernel: [179543.393488] 2432 free pages
Jan  7 10:27:23 lech kernel: [179543.393497] 1877 reserved pages
Jan  7 10:27:23 lech kernel: [179543.393506] 2015 slab pages
Jan  7 10:27:23 lech kernel: [179543.393514] 12900 pages shared
Jan  7 10:27:23 lech kernel: [179543.393523] 1480 pages swap cached
Jan  7 10:27:23 lech kernel: [179543.393537] [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
Jan  7 10:27:23 lech kernel: [179543.393578] [  137]     0   137      694       22   0     -17         -1000 udevd
Jan  7 10:27:23 lech kernel: [179543.393603] [  268]     0   268      693       23   0     -17         -1000 udevd
Jan  7 10:27:23 lech kernel: [179543.393626] [  275]     0   275      693       22   0     -17         -1000 udevd
Jan  7 10:27:23 lech kernel: [179543.393649] [ 1337]     0  1337      436        9   0     -17         -1000 ifplugd
Jan  7 10:27:23 lech kernel: [179543.393673] [ 1377]     0  1377      436        9   0     -17         -1000 ifplugd
Jan  7 10:27:23 lech kernel: [179543.393696] [ 1632]     0  1632     6992       33   0       0             0 rsyslogd
Jan  7 10:27:23 lech kernel: [179543.393720] [ 1654]     0  1654     1223       44   0     -17         -1000 dhclient
Jan  7 10:27:23 lech kernel: [179543.393742] [ 1714]   106  1714     1134        0   0       0             0 shellinaboxd
Jan  7 10:27:23 lech kernel: [179543.393765] [ 1715]     0  1715      423        0   0       0             0 startpar
Jan  7 10:27:23 lech kernel: [179543.393837] [ 1718]   106  1718     1134        0   0       0             0 shellinaboxd
Jan  7 10:27:23 lech kernel: [179543.393865] [ 1791]     0  1791     1380       33   0       0             0 cron
Jan  7 10:27:23 lech kernel: [179543.393887] [ 1796]   104  1796      794       30   0       0             0 dbus-daemon
Jan  7 10:27:23 lech kernel: [179543.393914] [ 1874]   102  1874     1377       47   0       0             0 ntpd
Jan  7 10:27:23 lech kernel: [179543.393962] [ 2045]     0  2045     2464       37   0       0             0 proftpd
Jan  7 10:27:23 lech kernel: [179543.393989] [ 2219]     0  2219     1552       11   0     -17         -1000 sshd
Jan  7 10:27:23 lech kernel: [179543.394012] [ 2319]     1  2319      431       33   0       0             0 uptimed
Jan  7 10:27:23 lech kernel: [179543.394035] [ 2426]     0  2426     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394058] [ 2427]     0  2427     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394080] [ 2428]     0  2428     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394103] [ 2429]     0  2429     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394124] [ 2430]     0  2430     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394146] [ 2431]     0  2431     1072        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394170] [ 2432]     0  2432      515        0   0       0             0 getty
Jan  7 10:27:23 lech kernel: [179543.394192] [ 2556]     0  2556     6629       31   0       0             0 console-kit-dae
Jan  7 10:27:23 lech kernel: [179543.394215] [ 2623]     0  2623     5571       22   0       0             0 polkitd
Jan  7 10:27:23 lech kernel: [179543.394238] [ 2642]  1000  2642     1560       35   0       0             0 screen
Jan  7 10:27:23 lech kernel: [179543.394260] [ 2643]  1000  2643     5200      157   0       0             0 irssi
Jan  7 10:27:23 lech kernel: [179543.394284] [ 3309]     0  3309     9072      550   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394309] [18457]     0 18457     3480       50   0       0             0 nmbd
Jan  7 10:27:23 lech kernel: [179543.394330] [18460]     0 18460     5772       56   0       0             0 smbd
Jan  7 10:27:23 lech kernel: [179543.394353] [18470]     0 18470     5850       21   0       0             0 smbd
Jan  7 10:27:23 lech kernel: [179543.394375] [22972]    33 22972    13188     4131   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394398] [22974]    33 22974    12932     3839   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394422] [22975]    33 22975    13207     2263   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394445] [22976]    33 22976    13199     2277   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394467] [23025]     0 23025      438       27   0       0             0 mysqld_safe
Jan  7 10:27:23 lech kernel: [179543.394490] [23627]   107 23627    82305     1334   0       0             0 mysqld
Jan  7 10:27:23 lech kernel: [179543.394511] [23628]     0 23628     1261       29   0       0             0 logger
Jan  7 10:27:23 lech kernel: [179543.394536] [23716]    33 23716    13188     2744   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394558] [23718]    33 23718    11654     3245   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394581] [23719]    33 23719    13202     1954   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394603] [23720]    33 23720    13194     3873   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394626] [23721]    33 23721    13188     3739   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394648] [23725]    33 23725    13188     2940   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394672] [24203]     0 24203     2451       34   0       0             0 sshd
Jan  7 10:27:23 lech kernel: [179543.394695] [24210]  1000 24210     2451       69   0       0             0 sshd
Jan  7 10:27:23 lech kernel: [179543.394717] [24211]  1000 24211     1817       70   0       0             0 bash
Jan  7 10:27:23 lech kernel: [179543.394740] [24266]    33 24266    13188     3080   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394762] [24267]    33 24267    12926     2922   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394786] [24270]    33 24270    11387     2829   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394809] [24313]    33 24313    11168     2726   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394831] [24316]    33 24316    11168     2723   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394854] [24319]    33 24319     9342     1161   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394876] [24320]    33 24320     9082      524   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394898] [24321]    33 24321     9078      501   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394921] [24329]    33 24329     9078      501   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394943] [24330]    33 24330     9078      501   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394966] [24331]    33 24331     9078      501   0       0             0 apache2
Jan  7 10:27:23 lech kernel: [179543.394984] Out of memory: Kill process 23627 (mysqld) score 121 or sacrifice child
Jan  7 10:27:23 lech kernel: [179543.395016] Killed process 23627 (mysqld) total-vm:329220kB, anon-rss:5080kB, file-rss:256kB
Jan  7 10:28:44 lech mysqld_safe: Number of processes running now: 0
Jan  7 10:28:59 lech mysqld_safe: mysqld restarted
Jan  7 10:29:02 lech kernel: [179643.772535] INFO: task kworker/u:2:24310 blocked for more than 120 seconds.
Jan  7 10:29:02 lech kernel: [179643.772561] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan  7 10:29:02 lech kernel: [179643.772578] kworker/u:2     D c037a204     0 24310      2 0x00000000
Jan  7 10:29:02 lech kernel: [179643.772646] [<c037a204>] (__schedule+0x2bc/0x568) from [<c029daec>] (__mmc_claim_host+0xa8/0x188)
Jan  7 10:29:02 lech kernel: [179643.772689] [<c029daec>] (__mmc_claim_host+0xa8/0x188) from [<c02a2e04>] (mmc_sd_detect+0x20/0x78)
Jan  7 10:29:02 lech kernel: [179643.772723] [<c02a2e04>] (mmc_sd_detect+0x20/0x78) from [<c029f8bc>] (mmc_rescan+0x1b4/0x314)
Jan  7 10:29:02 lech kernel: [179643.772769] [<c029f8bc>] (mmc_rescan+0x1b4/0x314) from [<c003da30>] (process_one_work+0x134/0x38c)
Jan  7 10:29:02 lech kernel: [179643.772805] [<c003da30>] (process_one_work+0x134/0x38c) from [<c003e4a4>] (worker_thread+0x1a0/0x354)
Jan  7 10:29:02 lech kernel: [179643.772844] [<c003e4a4>] (worker_thread+0x1a0/0x354) from [<c0042e3c>] (kthread+0x84/0x8c)
Jan  7 10:29:02 lech kernel: [179643.772886] [<c0042e3c>] (kthread+0x84/0x8c) from [<c000e930>] (kernel_thread_exit+0x0/0x8)
Jan  7 10:31:03 lech kernel: [179763.774449] INFO: task kworker/u:2:24310 blocked for more than 120 seconds.
Jan  7 10:31:04 lech kernel: [179763.774474] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan  7 10:31:04 lech kernel: [179763.774492] kworker/u:2     D c037a204     0 24310      2 0x00000000
Jan  7 10:31:04 lech kernel: [179763.774559] [<c037a204>] (__schedule+0x2bc/0x568) from [<c029daec>] (__mmc_claim_host+0xa8/0x188)
Jan  7 10:31:04 lech kernel: [179763.774604] [<c029daec>] (__mmc_claim_host+0xa8/0x188) from [<c02a2e04>] (mmc_sd_detect+0x20/0x78)
Jan  7 10:31:04 lech kernel: [179763.774639] [<c02a2e04>] (mmc_sd_detect+0x20/0x78) from [<c029f8bc>] (mmc_rescan+0x1b4/0x314)
Jan  7 10:31:04 lech kernel: [179763.774687] [<c029f8bc>] (mmc_rescan+0x1b4/0x314) from [<c003da30>] (process_one_work+0x134/0x38c)
Jan  7 10:31:04 lech kernel: [179763.774725] [<c003da30>] (process_one_work+0x134/0x38c) from [<c003e4a4>] (worker_thread+0x1a0/0x354)
Jan  7 10:31:04 lech kernel: [179763.774763] [<c003e4a4>] (worker_thread+0x1a0/0x354) from [<c0042e3c>] (kthread+0x84/0x8c)
Jan  7 10:31:04 lech kernel: [179763.774806] [<c0042e3c>] (kthread+0x84/0x8c) from [<c000e930>] (kernel_thread_exit+0x0/0x8)
Jan  7 10:33:02 lech kernel: [179883.776389] INFO: task kworker/u:2:24310 blocked for more than 120 seconds.
Jan  7 10:33:04 lech kernel: [179883.776415] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan  7 10:33:04 lech kernel: [179883.776431] kworker/u:2     D c037a204     0 24310      2 0x00000000
Jan  7 10:33:04 lech kernel: [179883.776515] [<c037a204>] (__schedule+0x2bc/0x568) from [<c029daec>] (__mmc_claim_host+0xa8/0x188)
Jan  7 10:33:04 lech kernel: [179883.776562] [<c029daec>] (__mmc_claim_host+0xa8/0x188) from [<c02a2e04>] (mmc_sd_detect+0x20/0x78)
Jan  7 10:33:04 lech kernel: [179883.776598] [<c02a2e04>] (mmc_sd_detect+0x20/0x78) from [<c029f8bc>] (mmc_rescan+0x1b4/0x314)
Jan  7 10:33:04 lech kernel: [179883.776647] [<c029f8bc>] (mmc_rescan+0x1b4/0x314) from [<c003da30>] (process_one_work+0x134/0x38c)
Jan  7 10:33:04 lech kernel: [179883.776710] [<c003da30>] (process_one_work+0x134/0x38c) from [<c003e4a4>] (worker_thread+0x1a0/0x354)
Jan  7 10:33:04 lech kernel: [179883.776752] [<c003e4a4>] (worker_thread+0x1a0/0x354) from [<c0042e3c>] (kthread+0x84/0x8c)
Jan  7 10:33:04 lech kernel: [179883.776795] [<c0042e3c>] (kthread+0x84/0x8c) from [<c000e930>] (kernel_thread_exit+0x0/0x8)
Jan  7 10:34:09 lech kernel: [179950.739465] ntpd invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Jan  7 10:34:09 lech kernel: [179950.739552] [<c0013e1c>] (unwind_backtrace+0x0/0xf0) from [<c008ca08>] (dump_header.isra.14+0x70/0x18c)
Jan  7 10:34:09 lech kernel: [179950.739610] [<c008ca08>] (dump_header.isra.14+0x70/0x18c) from [<c008cca8>] (oom_kill_process.constprop.19+0x68/0x27c)
Jan  7 10:34:09 lech kernel: [179950.739647] [<c008cca8>] (oom_kill_process.constprop.19+0x68/0x27c) from [<c008d2e4>] (out_of_memory+0x270/0x344)
Jan  7 10:34:09 lech kernel: [179950.739686] [<c008d2e4>] (out_of_memory+0x270/0x344) from [<c00903e8>] (__alloc_pages_nodemask+0x600/0x630)
Jan  7 10:34:09 lech kernel: [179950.739721] [<c00903e8>] (__alloc_pages_nodemask+0x600/0x630) from [<c008bd70>] (filemap_fault+0x250/0x4a8)
Jan  7 10:34:09 lech kernel: [179950.739780] [<c008bd70>] (filemap_fault+0x250/0x4a8) from [<c00a11f4>] (__do_fault+0x68/0x4a0)
Jan  7 10:34:09 lech kernel: [179950.739820] [<c00a11f4>] (__do_fault+0x68/0x4a0) from [<c00a3cf8>] (handle_pte_fault+0x74/0x784)
Jan  7 10:34:09 lech kernel: [179950.739853] [<c00a3cf8>] (handle_pte_fault+0x74/0x784) from [<c00a44b4>] (handle_mm_fault+0xac/0xec)
Jan  7 10:34:09 lech kernel: [179950.739899] [<c00a44b4>] (handle_mm_fault+0xac/0xec) from [<c037e0e8>] (do_page_fault+0x1c0/0x36c)
Jan  7 10:34:09 lech kernel: [179950.739949] [<c037e0e8>] (do_page_fault+0x1c0/0x36c) from [<c00083c0>] (do_PrefetchAbort+0x34/0x98)
Jan  7 10:34:09 lech kernel: [179950.740027] [<c00083c0>] (do_PrefetchAbort+0x34/0x98) from [<c037cd74>] (ret_from_exception+0x0/0x10)
Jan  7 10:34:09 lech kernel: [179950.740049] Exception stack(0xc9507fb0 to 0xc9507ff8)
Jan  7 10:34:09 lech kernel: [179950.740108] 7fa0:                                     00000000 be948b70 00000010 0002bead
Jan  7 10:34:09 lech kernel: [179950.740136] 7fc0: 000cd904 000821a4 000cd8fc 00000000 000ccdd8 00000001 00000000 000ccdcc
Jan  7 10:34:09 lech kernel: [179950.740159] 7fe0: 00079074 be948b70 0004fd98 4018674c 20000010 ffffffff
Jan  7 10:34:09 lech kernel: [179950.740174] Mem-info:
Jan  7 10:34:09 lech kernel: [179950.740184] Normal per-cpu:
Jan  7 10:34:09 lech kernel: [179950.740198] CPU    0: hi:   90, btch:  15 usd:  27
Jan  7 10:34:09 lech kernel: [179950.740226] active_anon:20116 inactive_anon:20175 isolated_anon:0
Jan  7 10:34:09 lech kernel: [179950.740234]  active_file:342 inactive_file:444 isolated_file:0
Jan  7 10:34:09 lech kernel: [179950.740241]  unevictable:0 dirty:0 writeback:0 unstable:0
Jan  7 10:34:09 lech kernel: [179950.740248]  free:2040 slab_reclaimable:528 slab_unreclaimable:1597
Jan  7 10:34:09 lech kernel: [179950.740257]  mapped:310 shmem:7 pagetables:1110 bounce:0
Jan  7 10:34:09 lech kernel: [179950.740312] Normal free:8160kB min:8192kB low:10240kB high:12288kB active_anon:80464kB inactive_anon:80700kB active_file:1368kB inactive_file:1776kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:195072kB mlocked:0kB dirty:0kB writeback:0kB mapped:1240kB shmem:28kB slab_reclaimable:2112kB slab_unreclaimable:6388kB kernel_stack:1344kB pagetables:4440kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:4493 all_unreclaimable? yes
Jan  7 10:34:09 lech kernel: [179950.740359] lowmem_reserve[]: 0 0
Jan  7 10:34:09 lech kernel: [179950.740372] Normal: 180*4kB 34*8kB 4*16kB 4*32kB 7*64kB 5*128kB 1*256kB 3*512kB 0*1024kB 0*2048kB 1*4096kB = 8160kB
Jan  7 10:34:09 lech kernel: [179950.740429] 6046 total pagecache pages
Jan  7 10:34:09 lech kernel: [179950.740442] 5253 pages in swap cache
Jan  7 10:34:09 lech kernel: [179950.740455] Swap cache stats: add 1903076, delete 1897823, find 546086/714007
Jan  7 10:34:09 lech kernel: [179950.740468] Free swap  = 0kB
Jan  7 10:34:09 lech kernel: [179950.740476] Total swap = 102396kB
Jan  7 10:34:09 lech kernel: [179950.751432] 49152 pages of RAM
Jan  7 10:34:09 lech kernel: [179950.751455] 2442 free pages
Jan  7 10:34:09 lech kernel: [179950.751464] 1877 reserved pages
Jan  7 10:34:09 lech kernel: [179950.751472] 2125 slab pages
Jan  7 10:34:09 lech kernel: [179950.751481] 4991 pages shared
Jan  7 10:34:09 lech kernel: [179950.751490] 5253 pages swap cached
Jan  7 10:34:09 lech kernel: [179950.751500] [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
Jan  7 10:34:09 lech kernel: [179950.751541] [  137]     0   137      694        5   0     -17         -1000 udevd
Jan  7 10:34:09 lech kernel: [179950.751563] [  268]     0   268      693        5   0     -17         -1000 udevd
Jan  7 10:34:09 lech kernel: [179950.751587] [  275]     0   275      693        5   0     -17         -1000 udevd
Jan  7 10:34:09 lech kernel: [179950.751610] [ 1337]     0  1337      436       11   0     -17         -1000 ifplugd
Jan  7 10:34:09 lech kernel: [179950.751632] [ 1377]     0  1377      436       11   0     -17         -1000 ifplugd
Jan  7 10:34:09 lech kernel: [179950.751654] [ 1632]     0  1632     6992       73   0       0             0 rsyslogd
Jan  7 10:34:09 lech kernel: [179950.751677] [ 1654]     0  1654     1223       48   0     -17         -1000 dhclient
Jan  7 10:34:09 lech kernel: [179950.751700] [ 1714]   106  1714     1134        1   0       0             0 shellinaboxd
Jan  7 10:34:09 lech kernel: [179950.751722] [ 1715]     0  1715      423        1   0       0             0 startpar
Jan  7 10:34:09 lech kernel: [179950.751744] [ 1718]   106  1718     1134        1   0       0             0 shellinaboxd
Jan  7 10:34:09 lech kernel: [179950.751767] [ 1791]     0  1791     1380       30   0       0             0 cron
Jan  7 10:34:09 lech kernel: [179950.751788] [ 1796]   104  1796      794        7   0       0             0 dbus-daemon
Jan  7 10:34:09 lech kernel: [179950.751811] [ 1874]   102  1874     1377       31   0       0             0 ntpd
Jan  7 10:34:09 lech kernel: [179950.751833] [ 2045]     0  2045     2464       34   0       0             0 proftpd
Jan  7 10:34:09 lech kernel: [179950.751856] [ 2219]     0  2219     1552       31   0     -17         -1000 sshd
Jan  7 10:34:09 lech kernel: [179950.751877] [ 2319]     1  2319      431       20   0       0             0 uptimed
Jan  7 10:34:09 lech kernel: [179950.751899] [ 2426]     0  2426     1072        1   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.751921] [ 2427]     0  2427     1072        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.751944] [ 2428]     0  2428     1072        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.751966] [ 2429]     0  2429     1072        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.751988] [ 2430]     0  2430     1072        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.752010] [ 2431]     0  2431     1072        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.752032] [ 2432]     0  2432      515        0   0       0             0 getty
Jan  7 10:34:09 lech kernel: [179950.752055] [ 2556]     0  2556     6629        8   0       0             0 console-kit-dae
Jan  7 10:34:09 lech kernel: [179950.752079] [ 2623]     0  2623     5571        5   0       0             0 polkitd
Jan  7 10:34:09 lech kernel: [179950.752101] [ 2642]  1000  2642     1560       21   0       0             0 screen
Jan  7 10:34:09 lech kernel: [179950.752124] [ 2643]  1000  2643     5200      110   0       0             0 irssi
Jan  7 10:34:09 lech kernel: [179950.752145] [ 3309]     0  3309     9072      150   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752170] [18457]     0 18457     3480       39   0       0             0 nmbd
Jan  7 10:34:09 lech kernel: [179950.752193] [18460]     0 18460     5772       40   0       0             0 smbd
Jan  7 10:34:09 lech kernel: [179950.752215] [18470]     0 18470     5850        6   0       0             0 smbd
Jan  7 10:34:09 lech kernel: [179950.752237] [22972]    33 22972    13188     1384   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752260] [22974]    33 22974    12932     2038   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752282] [22975]    33 22975    13196     3068   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752304] [22976]    33 22976    13188     3034   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752329] [23025]     0 23025      438       11   0       0             0 mysqld_safe
Jan  7 10:34:09 lech kernel: [179950.752352] [23716]    33 23716    13188     2185   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752375] [23718]    33 23718    13190     3551   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752397] [23719]    33 23719    13201     3430   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752420] [23721]    33 23721    13194     1945   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752443] [23725]    33 23725    13188     2206   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752466] [24203]     0 24203     2451       10   0       0             0 sshd
Jan  7 10:34:09 lech kernel: [179950.752489] [24210]  1000 24210     2451       51   0       0             0 sshd
Jan  7 10:34:09 lech kernel: [179950.752511] [24211]  1000 24211     1817      108   0       0             0 bash
Jan  7 10:34:09 lech kernel: [179950.752534] [24266]    33 24266    13188     1834   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752556] [24267]    33 24267    13188     1558   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752581] [24270]    33 24270    13180     3306   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752604] [24313]    33 24313    13180     3411   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752627] [24316]    33 24316    13180     3388   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752649] [24319]    33 24319    10096      448   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752671] [24320]    33 24320     9350      214   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752694] [24321]    33 24321     9072      293   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752717] [24329]    33 24329     9086      166   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752739] [24330]    33 24330     9072      291   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752761] [24331]    33 24331     9090      252   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752783] [24338]    33 24338     9348      209   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752806] [24339]    33 24339     9086      159   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752829] [24356]     0 24356     1552      124   0       0             0 sshd
Jan  7 10:34:09 lech kernel: [179950.752851] [24361]     0 24361     3368       86   0       0             0 mysqld
Jan  7 10:34:09 lech kernel: [179950.752874] [24363]     0 24363     1261        8   0       0             0 logger
Jan  7 10:34:09 lech kernel: [179950.752896] [24398]     0 24398     1552      139   0       0             0 sshd
Jan  7 10:34:09 lech kernel: [179950.752918] [24401]    33 24401     9072      291   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752942] [24407]    33 24407     9072      290   0       0             0 apache2
Jan  7 10:34:09 lech kernel: [179950.752965] [24414]    33 24414      438       41   0       0             0 sh
Jan  7 10:34:09 lech kernel: [179950.752986] [24415]    33 24415      749      120   0       0             0 top
Jan  7 10:34:09 lech kernel: [179950.753009] [24422]    33 24422      438       48   0       0             0 sh
Jan  7 10:34:09 lech kernel: [179950.753030] [24423]    33 24423      105       33   0       0             0 uprecords
Jan  7 10:34:09 lech kernel: [179950.753051] Out of memory: Kill process 22975 (apache2) score 67 or sacrifice child
Jan  7 10:34:09 lech kernel: [179950.753071] Killed process 22975 (apache2) total-vm:52784kB, anon-rss:11684kB, file-rss:588kB
Jan  7 10:35:02 lech kernel: [180003.778250] INFO: task kworker/u:2:24310 blocked for more than 120 seconds.
Jan  7 10:35:02 lech kernel: [180003.778276] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan  7 10:35:02 lech kernel: [180003.778292] kworker/u:2     D c037a204     0 24310      2 0x00000000
Jan  7 10:35:02 lech kernel: [180003.778362] [<c037a204>] (__schedule+0x2bc/0x568) from [<c029daec>] (__mmc_claim_host+0xa8/0x188)
Jan  7 10:35:02 lech kernel: [180003.778405] [<c029daec>] (__mmc_claim_host+0xa8/0x188) from [<c02a2e04>] (mmc_sd_detect+0x20/0x78)
Jan  7 10:35:02 lech kernel: [180003.778440] [<c02a2e04>] (mmc_sd_detect+0x20/0x78) from [<c029f8bc>] (mmc_rescan+0x1b4/0x314)
Jan  7 10:35:02 lech kernel: [180003.778486] [<c029f8bc>] (mmc_rescan+0x1b4/0x314) from [<c003da30>] (process_one_work+0x134/0x38c)
Jan  7 10:35:02 lech kernel: [180003.778560] [<c003da30>] (process_one_work+0x134/0x38c) from [<c003e4a4>] (worker_thread+0x1a0/0x354)
Jan  7 10:35:02 lech kernel: [180003.778606] [<c003e4a4>] (worker_thread+0x1a0/0x354) from [<c0042e3c>] (kthread+0x84/0x8c)
Jan  7 10:35:02 lech kernel: [180003.778674] [<c0042e3c>] (kthread+0x84/0x8c) from [<c000e930>] (kernel_thread_exit+0x0/0x8)
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [Note] Plugin 'FEDERATED' is disabled.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: The InnoDB memory heap is disabled
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Compressed tables use zlib 1.2.7
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Using Linux native AIO
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Initializing buffer pool, size = 128.0M
Jan  7 10:36:02 lech mysqld: InnoDB: mmap(135987200 bytes) failed; errno 12
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Completed initialization of buffer pool
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 InnoDB: Fatal error: cannot allocate memory for the buffer pool
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Plugin 'InnoDB' init function returned error.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [ERROR] Aborting
Jan  7 10:36:02 lech mysqld: 
Jan  7 10:36:02 lech mysqld: 130107 10:36:02 [Note] /usr/sbin/mysqld: Shutdown complete
Jan  7 10:36:02 lech mysqld: 
Jan  7 10:36:02 lech mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Jan  7 10:39:01 lech /USR/SBIN/CRON[24543]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
That doesn't give me much info but I hope that you can get something out of it.
I think those are all logs from the reinstalation of mysql untill it dies.

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 12:33 pm

Code: Select all

Jan  7 10:27:22 lech kernel: [179543.381775] mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Your system is running low on memory and the kernel is looking for something big to kill off. oom-killer stands for out-of-memory-killer. In this case it found mysqld, and killed it. The idea behind that is that the kernel doesn't know if a big process is big for a valid reason or because it is leaking memory, and the kernel's job is to keep the system running as best it can for all users, so it kills something big when it is running out of resources.

Do you have a 512MB Pi or a 256MB one? What CPU/GPU memory split do you have configured? Do you have a swap partition or swapfile? Can you configure mysql to limit its memory requirements? Are you running other processes that might be using lots of memory?

You can use 'free' to see how much memory Linux has to play with, and if you have swap enabled. You can use 'ps' or 'top' to see how much memory each process is using.

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 1:02 pm

You might say that my Pi is quite old. I've got it on July. Back then when i was ordering it there was only 256mb version B

Code: Select all

pi@lech ~ $ free
             total       used       free     shared    buffers     cached
Mem:        189100     166792      22308          0      11172      36308
-/+ buffers/cache:     119312      69788
Swap:       102396      45008      57388
I have it set to use minimal memory for video - i think it's 32mb
and as you can see - swap file is the 'standart' one set up by installer ;-)

and for the memory consumer you might say that apache is guilty ;-/

take a look on my pi page and you can see all resources

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 3:22 pm

Ah, ok. So at least you could make the swapfile bigger - then use "vmstat 1" to monitor whether it is swapping or not in normal use (it could be stuff gets swapped out and not accessed again, so you just need the swap space but the system doesn't slow down much as a result). If it does swap in normal use you'll see horrible performance though, and your SD card will wear out more quickly.

pwl
Posts: 18
Joined: Wed Jul 25, 2012 1:18 pm
Location: Poland
Contact: Website

Re: MySQL problem. ERROR 2002 (HY000)

Mon Jan 07, 2013 3:36 pm

rgh wrote:Ah, ok. So at least you could make the swapfile bigger - then use "vmstat 1" to monitor whether it is swapping or not in normal use (it could be stuff gets swapped out and not accessed again, so you just need the swap space but the system doesn't slow down much as a result). If it does swap in normal use you'll see horrible performance though, and your SD card will wear out more quickly.
I was thinking to move swap to externam USB drive ;-)
not sure how to make it thou :-P
need to take a look on some tutorials.

but first thing first - steal my grilfriends pendrive :twisted:

thx for help rgh. You've been more then helpful ;-)

Code: Select all

<beer>

-----------edited-------------

Code: Select all

pi@lech ~ $ sudo service mysql stop
[ ok ] Stopping MySQL database server: mysqld.
pi@lech ~ $ sudo /etc/init.d/apache2 stop
[ ok ] Stopping web server: apache2 ... waiting .
pi@lech ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:           184         57        127          0         10         25
-/+ buffers/cache:         20        163
Swap:           99          8         91
pi@lech ~ $ nano /etc/dphys-swapfile
pi@lech ~ $ sudo dphys-swapfile setup
want /var/swap=512MByte, checking existing: deleting wrong size file (104857600), generating swapfile ... of 512MBytes
pi@lech ~ $ sudo dphys-swapfile swapon 
pi@lech ~ $ sudo /etc/init.d/apache2 start
[ ok ] Starting web server: apache2.
pi@lech ~ $ sudo service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
pi@lech ~ $ sudo service mysql start
[ ok ] Starting MySQL database server: mysqld . . . ..
[info] Checking for tables which need an upgrade, are corrupt or were not closed cleanly..
this is something i think might be solution
we will see if the mysql will keep runing.

Return to “Beginners”