2

MySQL crashes every now and then due to, I believe, a large request hitting it above the innodb-buffer-pool-size set in my.cnf (currently at 210M), which I needed to set for mysql to start in the first place.

Here are the error logs:

    130518 17:28:52 mysqld_safe Number of processes running now: 0
    130518 17:28:52 mysqld_safe mysqld restarted
    130518 17:28:52 [Note] Plugin 'FEDERATED' is disabled.
    130518 17:28:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130518 17:28:52 InnoDB: Compressed tables use zlib 1.2.3
    130518 17:28:52 InnoDB: Using Linux native AIO
    130518 17:28:52 InnoDB: Initializing buffer pool, size = 210.0M
    InnoDB: mmap(223117312 bytes) failed; errno 12
    130518 17:28:52 InnoDB: Completed initialization of buffer pool
    130518 17:28:52 InnoDB: Fatal error: cannot allocate memory for the buffer pool
    130518 17:28:52 [ERROR] Plugin 'InnoDB' init function returned error.
    130518 17:28:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    130518 17:28:52 [ERROR] Unknown/unsupported storage engine: InnoDB
    130518 17:28:52 [ERROR] Aborting

    130518 17:28:52 [Note] /usr/libexec/mysqld: Shutdown complete

    130518 17:28:52 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Rebooted the server and restarted mysqld here. Fixes the problem temporarily, but it will crash again.

    130518 18:22:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130518 18:22:32 [Note] Plugin 'FEDERATED' is disabled.
    130518 18:22:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130518 18:22:32 InnoDB: Compressed tables use zlib 1.2.3
    130518 18:22:32 InnoDB: Using Linux native AIO
    130518 18:22:32 InnoDB: Initializing buffer pool, size = 210.0M
    130518 18:22:32 InnoDB: Completed initialization of buffer pool
    130518 18:22:32 InnoDB: highest supported file format is Barracuda.
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    130518 18:22:32  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    130518 18:22:32  InnoDB: Waiting for the background threads to start
    130518 18:22:33 InnoDB: 5.5.31 started; log sequence number 789470772
    130518 18:22:33 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    130518 18:22:33 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    [mysqld]
    130518 18:22:33 [Note] Server socket created on IP: '0.0.0.0'.
    130518 18:22:33 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
    130518 18:22:33 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
    130518 18:22:33 [Note] Event Scheduler: Loaded 0 events
    130518 18:22:33 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.5.31'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi

Here is my my.cnf: pastebin.com/SSeU8gxK

slyv
  • 121
  • 1
  • 4

1 Answers1

1

Add the following parameters and check if the problem is resolved:
innodb_buffer_pool_instances=3
innodb_change_buffering=inserts
innodb_flush_method=O_DIRECT

Sunrays
  • 128
  • 1
  • 1
  • 9