Re: Why is Mysqld is crashing every few hours
Posted by: Ronald Brown
Date: May 23, 2018 08:43AM


i found the issue casuing the mysqld to restart every few hours.,

it was becuase of not properly sanitizing user input before hitting the full text search .

so the problematic search term "+word1+word2+word3" this caused the mysql to eat up memoery as query took more than 5 minutes to give results., one more thing i can think of is low free memory and low swap space and low swappiness value.

so i sanitized user input
increased swap space
set swappiness value to default which is 60

restarted mysqld

and server never crashed since then.

mysql> status
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper

Connection id: 59522120
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.22-log MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 12 days 34 min 14 sec

Threads: 4 Questions: 677500186 Slow queries: 27552 Opens: 744 Flush tables: 1 Open tables: 488 Queries per second avg: 652.161

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.