I running a wordpress website in 512 MB Memory / 20 GB Disk /Ubuntu LAMP on 14.04,everything working fine for 2 weeks,then suddenly appear Error establishing a database connection this is what I try to solve this problem
Now I cant even go in phpmyadmin,it show #2002 Cannot log in to the MySQL server in my phpmyadmin page even my username and password is correct.
Please suggest me a solution to solve this,cause I really dont want to configure the whole server and build the site all over again.
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!
I noticed a large number of requests coming to my site. Looking at the log file located at /var/log/apache2/access.log I noticed a large number of requests each second to /xmlrpc.php.
This causes the server to run out of memory pretty quickly and the mysql service eventually either fails or is restarted for some reason.
Maybe the same thing is happening to you.
If that’s your case look at: https://www.digitalocean.com/community/tutorials/how-to-protect-wordpress-from-xml-rpc-attacks-on-ubuntu-14-04
I am having a similar problem. This is what my log file shows:
2017-07-22T15:26:09.153240Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 2017-07-22T15:26:09.153247Z 0 [Note] InnoDB: Using Linux native AIO 2017-07-22T15:26:09.155154Z 0 [Note] InnoDB: Number of pools: 1 2017-07-22T15:26:09.157889Z 0 [Note] InnoDB: Using CPU crc32 instructions 2017-07-22T15:26:09.165356Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2017-07-22T15:26:09.165839Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12 2017-07-22T15:26:09.165857Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 2017-07-22T15:26:09.165870Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-07-22T15:26:09.165884Z 0 [ERROR] Plugin ‘InnoDB’ init function returned error. 2017-07-22T15:26:09.165891Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed. 2017-07-22T15:26:09.165916Z 0 [ERROR] Failed to initialize plugins. 2017-07-22T15:26:09.165920Z 0 [ERROR] Aborting
2017-07-22T15:26:09.165937Z 0 [Note] Binlog end 2017-07-22T15:26:09.167271Z 0 [Note] Shutting down plugin ‘MyISAM’ 2017-07-22T15:26:09.167486Z 0 [Note] Shutting down plugin ‘CSV’ 2017-07-22T15:26:09.168462Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
It is probably memory issue, try to increase the RAM for the droplet.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.