I have a server running web site with back-end database MySQL (more specific - 5.5.37-MariaDB, for debian-linux-gnu on x86_64).
Sometimes it stops accepting connections and web site scripts report "unable to connect to the server". After I restart MySQL server it works ok for some time (up to several days).
syslog, mysql.error and dmesg show no related errors. slow-query log however shows that at some moment queries are executed slower and slower (starting from about 1 second and ending at 70). After I restart MySQL same queries are executed immediately.
How can I fix it or at least define issue cause?