Error establishing a database connection whit kernel BSD

April 23, 2016 1.2k views
Server Optimization MySQL FreeBSD

I get: Error Establishing a database connection. Relaunch the console system. But after a series of swap errors prompt tells me: assocond-cconafi kernel: pid 830 (httpd), vid80 was killed. What does it mean? What can I do to fix it? This server behavior occurs now every day after a few hours of successful operation. Untenable situation.

1 comment
  • Here is the list of errors that appear at the prompt:
    assocond-cconafi kernel: pid 1096 (mysqld), uid 88, was killed: out of swap space
    assocond-cconafi kernel: pid 956 (httpd), uid 956, was killed: out of swap space
    assocond-cconafi kernel: pid 864 (httpd), uid 80, was killed: out of swap space
    swappager: out of swap space
    swap
    pager_getswapspace(14): failed
    assocond-cconafi kernel: pid 1104 (mysqld), uid 88, was killed: out of swap space

5 Answers

You are running out of memory and swap space and the kernel OOM killer is killing the Mysqld process.
Possible steps:

  • Use virt instance with more RAM.
  • Add more swap.
  • Reduce Mysql memory utilization in the config.
  • Remove additional services that might be running on the same host.
  • Thanks indications. For now I have updated the system and it seems to work. We hope.
    Ricccardo

When you look at your apache logs (/var/log/httpd-access.log), do you see a bunch of requests hitting xmlrpc.php?
I've seen this happen a ton of times when servers are under an XMLRPC pingback attack.

  • I installed JetPack to protect against attacks, but it does not always work and sometimes the blog down. I do not know what to do.

    Grazie.

    • I have multiple webservers that had the same issue. I'd get tons of pingback attacks, mysqld memory would balloon and my webserver locked up.

      The only way I was able to totally stop them was to setup an .htaccess file to block all access to that file.

      <Files "xmlrpc.php">
      Order Allow,Deny
      deny from all
      </Files>

      I'm not sure if that's an option for you, but hopefully this helps.

Have another answer? Share your knowledge.