Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
beepsandboops
Jan 28, 2014
Problem description: I'm trying to help out a friend with a website, which wasn't set up by either me nor them. It's a WordPress site running on Ubuntu 14.04, and it regularly just shits the bed and throws up a "Error establishing a database connection" message on the site.

Attempted fixes: Rebooting doesn't help

Checked system resources with top, nothing seems to be running out of control

The wp-admin page is showing the same error message, so I don't think that that DB is corrupted or anything.

All of the MySQL logs are empty, and the Apache logs seem okay.

I checked wp-config.php and it seems like it has all of the right info to connect to the DB. Is there any way to verify what credentials I need to be using there?

Recent changes: Nothing that I know of

--

Operating system: Ubuntu 14.04

System specs: VPS hosted by DigitalOcean, I believe 1 GB RAM

Location: USA

I have Googled and read the FAQ: Yes

Adbot
ADBOT LOVES YOU

beepsandboops
Jan 28, 2014
Thanks for the exhaustive reply! Feeling a bit stupid, b/c it just looks like mysql wasn't running. I started it up and ran the command you recommended to have it automatically start up again.

I'll keep an eye on it but hopefully that was it! Thanks again

beepsandboops
Jan 28, 2014
OK, site worked for maybe a day before crashing again. If I'm reading everything right, it looks like the box is running out of memory and making GBS threads the bed.

I checked /var/log/mysql/error.log and this is what I see:

code:
160710  8:42:25 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160710  8:42:25 [Note] Plugin 'FEDERATED' is disabled.
160710  8:42:25 InnoDB: The InnoDB memory heap is disabled
160710  8:42:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160710  8:42:25 InnoDB: Compressed tables use zlib 1.2.8
160710  8:42:25 InnoDB: Using Linux native AIO
160710  8:42:26 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160710  8:42:26 InnoDB: Completed initialization of buffer pool
160710  8:42:26 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160710  8:42:26 [ERROR] Plugin 'InnoDB' init function returned error.
160710  8:42:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160710  8:42:26 [ERROR] Unknown/unsupported storage engine: InnoDB
160710  8:42:26 [ERROR] Aborting

160710  8:42:26 [Note] /usr/sbin/mysqld: Shutdown complete
When I check htop, this is what I see (sorting by memory)



The machine only has 1GB of memory, but for a small website that doesn't get much traffic I wouldn't think that would matter too much

Is there some obvious Apache setting that I'm missing that would stop it from launching a ton of processes?

  • Locked thread