LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-20-2011, 03:51 AM   #1
ovidiu84
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
MySQL Crashing on SQL


For the past 4 days MySQL keeps crashing on running scripts, like once / day

this is the error log

Code:
key_buffer_size=134217728
read_buffer_size=1048576
max_used_connections=39
max_threads=100
threads_connected=34
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 336508 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x92025f38
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 = 0x95dce36c thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2d) [0x6b65ad]
/usr/sbin/mysqld(handle_segfault+0x494) [0x3823d4]
[0x110400]
/usr/sbin/mysqld(MYSQLparse(void*)+0x6aa) [0x3b42da]
/usr/sbin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x23e) [0x39ce6e]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xf35) [0x39df25]
/usr/sbin/mysqld(do_command(THD*)+0xf3) [0x39f0e3]
/usr/sbin/mysqld(handle_one_connection+0x2a0) [0x38dbd0]
/lib/tls/i686/cmov/libpthread.so.0(+0x596e) [0x93d96e]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xd78a4e]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x86982ef4 is an invalid pointer
thd->thread_id=2906
thd->killed=NOT_KILLED
The box runs on 2GB RAM, by my calculations it shouldn't have the problem with max memory. I've specifically lowered the memory requirements to a minimum but still getting the errors.

Code:
mysql> show variables like "sort_buffer%";
+------------------+---------+
| Variable_name    | Value   |
+------------------+---------+
| sort_buffer_size | 1048576 |
+------------------+---------+
It crashed today on this SQL query
Code:
ALTER TABLE FieldDefaultValue MODIFY value_field varchar(2000) CHARACTER SET utf8 collate utf8_bin;
Anyone got any similar experience ?
 
Old 06-20-2011, 05:01 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I don't actually use MySQL, and don't hold it in particularly
high esteem (speed aside), but I'm wondering whether you're
encountering a physical problem, maybe RAM or DMA going broke
or something. Have you tried doing any other memory intense
operations? E.g., try kicking off a largish compile (X11,
openOffice, kernel, ... ) and see whether they crash, too ...


That possibility aside: did you update/change anything in the
last 4-5 days?



Cheers,
Tink
 
Old 06-20-2011, 05:05 AM   #3
ovidiu84
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
I don't actually use MySQL, and don't hold it in particularly
high esteem (speed aside), but I'm wondering whether you're
encountering a physical problem, maybe RAM or DMA going broke
or something. Have you tried doing any other memory intense
operations? E.g., try kicking off a largish compile (X11,
openOffice, kernel, ... ) and see whether they crash, too ...


That possibility aside: did you update/change anything in the
last 4-5 days?



Cheers,
Tink
I got to thinking the same thing, faulty RAM, since I haven't changed anything in the configuration for the past 3 months and I haven't had any problems until 4-5 days ago. What's changed is the number of databases on the server, we've gotten from 10-12 to about 40-50 (no, there's no disk space issues, plenty of space left).

I need to mention that this is a testing enviroment for devs, so most of the databases are not even in use atm.
I just wanna rule out a faulty mysql config on my side.
 
Old 06-20-2011, 05:13 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
What's the free memory on the box? Have you tried running top
while running any of the things that make MySQL die, and see
what the RAM usage is?


Cheers,
Tink
 
Old 06-20-2011, 05:18 AM   #5
ovidiu84
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
What's the free memory on the box? Have you tried running top
while running any of the things that make MySQL die, and see
what the RAM usage is?


Cheers,
Tink

top:
Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8242 root      20   0 1426m 647m 2012 S    0 32.3   5:08.00 java
27686 mysql     20   0  701m 487m 4856 S   96 24.3  28:26.89 mysqld
Code:
root@xxxxxxxxxx:~# free -m
             total       used       free     shared    buffers     cached
Mem:          2004       1957         47          0         32        700
But it's usually like this with no effects so far, the CPU usage is kinda normal cause of the various SQL queries being ran by the devs.
 
Old 06-20-2011, 05:23 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
What are your chances of taking the machine down, and running
e.g., memtest on it? Slim during working hours I assume?
 
Old 06-20-2011, 05:25 AM   #7
ovidiu84
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
What are your chances of taking the machine down, and running
e.g., memtest on it? Slim during working hours I assume?
Now: 0 . It's a dev enviroment, I could probably do it late after work hours, since most of the devs work late into the evening.
 
Old 06-21-2011, 08:17 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
And how did that go?



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
web/mysql errors unix1adm Linux - Security 3 11-10-2009 10:15 AM
10.2 and mysql errors markb658 Slackware 2 07-07-2006 09:54 PM
MySQL errors newuser455 Linux - Software 3 03-24-2005 11:48 PM
postfix / mysql errors theetderks Linux - Newbie 1 02-04-2004 03:22 PM
MySQL errors Hdata Linux - Distributions 8 04-26-2003 03:56 PM


All times are GMT -5. The time now is 10:38 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration