LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2009, 10:40 AM   #1
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Rep: Reputation: 15
Exclamation Mysql Being a Memory Hog and Crashing (Deb lenny)


Hi,

I've got this issue for past week.

Mysql Crashes with 111 error although it starts back up instantly.

but i can't seem to figure out why.

-Server Is Deb. Lenny + Direct Admin.

Quad Core 2.5, 8GB Ram.

-Mysql ver 5.3

-Htop shows mysql is most of the time using 33 - 50% CPU.
(the init.d name is /etc/init.d/mysqld )

-This is from the err log of last crash.

Code:
key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=8
max_threads=151
threads_connected=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337724 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xb2217ca8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0xb48e43b8 thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x21)[0x84d6981]
/usr/local/mysql/bin/mysqld(handle_segfault+0x381)[0x8200291]
[0xffffe400]
/usr/local/mysql/bin/mysqld(_Z8filesortP3THDP8st_tableP13st_sort_fieldjP10SQL_SELECTybPy+0x11db)[0x82ebc4b]
/usr/local/mysql/bin/mysqld[0x8271bc8]
/usr/local/mysql/bin/mysqld(_ZN4JOIN4execEv+0x8e7)[0x827c447]
/usr/local/mysql/bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xdb)[0x827865b]
/usr/local/mysql/bin/mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x15e)[0x827e10e]
/usr/local/mysql/bin/mysqld[0x820d1d0]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x32b4)[0x8212f04]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x340)[0x8217430]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x11e0)[0x8218620]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0xe0)[0x8218ea0]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x233)[0x82099a3]
/lib/i686/cmov/libpthread.so.0[0xb7efa4c0]
/lib/i686/cmov/libc.so.6(clone+0x5e)[0xb7e036de]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8c8df18 = SELECT userid, usergroupid, displaygroupid, username, posts
						FROM user AS user
						WHERE posts > '0' 
						ORDER BY posts DESC
						LIMIT 0, 5
thd->thread_id=8646
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
091221 13:10:27 mysqld_safe Number of processes running now: 0
091221 13:10:27 mysqld_safe mysqld restarted
091221 13:10:27  InnoDB: Started; log sequence number 0 86140
091221 13:10:27 [Note] Event Scheduler: Loaded 0 events
091221 13:10:27 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.34'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)

Any help on this,
Thank in Adv!
 
Old 12-21-2009, 02:09 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Did you review the page it suggests and follow the directions there to get a better idea of what is causing the specific problem other than looking at the error log?

Secondary question is are you running 64bit?

Last edited by rweaver; 12-21-2009 at 02:14 PM.
 
Old 12-21-2009, 10:28 PM   #3
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
- mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

- Uname -a says its a i686. Kernel 2.6.28.7
 
Old 12-22-2009, 12:06 PM   #4
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
any help on this please?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
smb4k memory hog coldsalmon Linux - Software 3 05-31-2005 03:39 PM
Linux being a hog for memory. Kefka_DArden Linux - Newbie 6 04-19-2004 04:25 PM
Linux memory hog? ryedunn Linux - Hardware 2 03-28-2004 11:45 AM
Memory Hog? AekaGSR Linux - Newbie 2 07-04-2003 10:55 AM
memory hog jct842 Linux - Newbie 2 02-28-2002 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration