Report this

What is the reason for this report?

Wordpress - mysql crash

Posted on July 24, 2017

Hello what’s wrong on Digital Ocean?

I have a droplet with 1 GB Memory / 30 GB Disk / AMS2 - Ubuntu 16.04.2 x64 and it work very well in the last 2 months.

Now i want know why in the last 4 days mysql stop working??? i really don’t understand why this occured, i have one more droplet with same specs and more Wordpress site on it, and work very well.

problem is related to ram consuption, but i try a2dissite all my sites and leave just one active, problem persist!!!

tail -40 /var/log/mysql/error.log

2017-07-24T19:04:30.218958Z 0 [Note] InnoDB: Number of pools: 1 2017-07-24T19:04:30.219177Z 0 [Note] InnoDB: Using CPU crc32 instructions 2017-07-24T19:04:30.222532Z 0 [Note] InnoDB: Initializing buffer pool, total siz e = 128M, instances = 1, chunk size = 128M 2017-07-24T19:04:30.222644Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errn o 12 2017-07-24T19:04:30.222824Z 0 [ERROR] InnoDB: Cannot allocate memory for the buf fer pool 2017-07-24T19:04:30.222864Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-07-24T19:04:30.222887Z 0 [ERROR] Plugin ‘InnoDB’ init function returned err or. 2017-07-24T19:04:30.222904Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed. 2017-07-24T19:04:30.222921Z 0 [ERROR] Failed to initialize plugins. 2017-07-24T19:04:30.222935Z 0 [ERROR] Aborting

2017-07-24T19:04:30.222951Z 0 [Note] Binlog end 2017-07-24T19:04:30.223066Z 0 [Note] Shutting down plugin ‘MyISAM’ 2017-07-24T19:04:30.223766Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2017-07-24T19:05:00.448335Z 0 [Warning] Changed limits: max_open_files: 1024 (re quested 5000) 2017-07-24T19:05:00.448433Z 0 [Warning] Changed limits: table_open_cache: 431 (r equested 2000) 2017-07-24T19:05:00.658943Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details). 2017-07-24T19:05:00.662549Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.19-0ubuntu0.16 .04.1) starting as process 5831 … 2017-07-24T19:05:00.672747Z 0 [Note] InnoDB: PUNCH HOLE support available 2017-07-24T19:05:00.672879Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2017-07-24T19:05:00.672910Z 0 [Note] InnoDB: Uses event mutexes 2017-07-24T19:05:00.673003Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2017-07-24T19:05:00.673107Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 2017-07-24T19:05:00.673136Z 0 [Note] InnoDB: Using Linux native AIO 2017-07-24T19:05:00.674193Z 0 [Note] InnoDB: Number of pools: 1 2017-07-24T19:05:00.674524Z 0 [Note] InnoDB: Using CPU crc32 instructions 2017-07-24T19:05:00.677755Z 0 [Note] InnoDB: Initializing buffer pool, total siz e = 128M, instances = 1, chunk size = 128M 2017-07-24T19:05:00.677867Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errn o 12 2017-07-24T19:05:00.677951Z 0 [ERROR] InnoDB: Cannot allocate memory for the buf fer pool 2017-07-24T19:05:00.677980Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-07-24T19:05:00.677996Z 0 [ERROR] Plugin ‘InnoDB’ init function returned err or. 2017-07-24T19:05:00.678006Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed. 2017-07-24T19:05:00.678017Z 0 [ERROR] Failed to initialize plugins. 2017-07-24T19:05:00.678025Z 0 [ERROR] Aborting

2017-07-24T19:05:00.678051Z 0 [Note] Binlog end 2017-07-24T19:05:00.678201Z 0 [Note] Shutting down plugin ‘MyISAM’ 2017-07-24T19:05:00.679034Z 0 [Note] /usr/sbin/mysqld: Shutdown complete



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @ghostpizza

You’re running out of memory, that’s why MySQL is being crashed, so the entire system doesn’t crash.

Are you using CloudFlare? If yes, then make sure it’s not doing offline-cache of your site, since it hammers every page on your site every hour. Otherwise you need to setup cache.

Also make sure you’re not being attacked by having a look in the access log:

# If you're using Apache, then this is the default path
tail -f /var/log/apache2/access.log
# If you're using Nginx, then this is the default path
tail -f /var/log/nginx/access.log
# Press CTRL+C to exit the monitoring

I had memory issues with my droplet hosting just a couple of WordPress sites with very low traffic.

However, I added the following to my apache2.conf:

<files xmlrpc.php>
        order allow,deny
        deny from all
</files>

My issues with MariaDB running out of RAM seem to have disappeared after doing this, so I suspect it could have been an XML RPC attack against WordPress.

i am very frustating, here you can see graph of my droplet, memory drop down just after droplet shutdown - r : https://ibb.co/kqOhS5

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.