I'm running CentOS 6 with Apache/PHP/MySQL. PS. I'm sort of a novice at Linux, but I did my best to gather info before coming here. I'm now a bit stuck.
- I recently upgraded PHP to version 5.5.12.
- I had previously upgraded MySQL to version 5.6. However, this issue didn't begin until I later did the PHP upgrade mentioned above.
Nearly every day, and sometimes multiple times per day, my website will start displaying the following in the browser, in place of any website content:
Connection Failed: 2002
I read that this is probably generated by MySQL. The error persists until I manually restart
mysqld. This is starting to happen more and more frequently, sometimes several times per hour.
Here is a relevant section of my MySQL error log from one of those occurrences (they all pretty much look like this):
2014-07-28 11:22:46, , mysqld_safe, Number of processes running now: 0 2014-07-28 11:22:46, , mysqld_safe, mysqld restarted 2014-07-28 11:22:52, 0, Warning, TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2014-07-28 11:22:52, 1503, Note, Plugin 'FEDERATED' is disabled. 2014-07-28 11:22:52, 1503, Note, InnoDB: Using atomics to ref count buffer pool pages 2014-07-28 11:22:52, 1503, Note, InnoDB: The InnoDB memory heap is disabled 2014-07-28 11:22:52, 1503, Note, InnoDB: Mutexes and rw_locks use GCC atomic builtins 2014-07-28 11:22:52, 1503, Note, InnoDB: Compressed tables use zlib 1.2.3 2014-07-28 11:22:52, 1503, Note, InnoDB: Using Linux native AIO 2014-07-28 11:22:52, 1503, Note, InnoDB: Using CPU crc32 instructions 2014-07-28 11:22:52, 1503, Note, InnoDB: Initializing buffer pool, size = 128.0M , , , InnoDB: mmap(137363456 bytes) failed; errno 12 2014-07-28 11:22:52, 1503, ERROR, InnoDB: Cannot allocate memory for the buffer pool 2014-07-28 11:22:52, 1503, ERROR, Plugin 'InnoDB' init function returned error. 2014-07-28 11:22:52, 1503, ERROR, Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2014-07-28 11:22:52, 1503, ERROR, Unknown/unsupported storage engine: InnoDB 2014-07-28 11:22:52, 1503, ERROR, Aborting
This is not from the initial
mysqld run at bootup -- that one starts fine. It looks like
mysqld is starting itself again at random times (I'm not sure if that's normal?) and encountering this error.
PS. I can trigger the error by running this:
$ valgrind mysqld
...which in the SSH console returns:
1868 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
This replaces my website with
Connection Failed: 2002 the same way, but I'm not sure if that happens for the same reason as the random occurrences. I figured I'd mention this just in case it provides clues.