Назад | Перейти на главную страницу

MySQL завершает работу без предупреждения, не хватает памяти?

Я ломаю голову по этому поводу. У меня есть отслеживание New Relic и мои файлы журналов на сервере, но MySQL продолжает останавливаться, и все, что у меня есть, это когда я проверяю журналы, New Relic ничего не имеет. Единственное, что я вижу, это «Инициализация буферного пула, размер = 128.0M». Мне просто не хватает памяти?

root@ps1:/var/log/mysql# cat error.log
140619 23:12:10 [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.
140619 23:12:10 [Note] Plugin 'FEDERATED' is disabled.
140619 23:12:10 InnoDB: The InnoDB memory heap is disabled
140619 23:12:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140619 23:12:10 InnoDB: Compressed tables use zlib 1.2.3.4
140619 23:12:10 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140619 23:12:10 InnoDB: Completed initialization of buffer pool
140619 23:12:10 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140619 23:12:10 [ERROR] Plugin 'InnoDB' init function returned error.
140619 23:12:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140619 23:12:10 [ERROR] Unknown/unsupported storage engine: InnoDB
140619 23:12:10 [ERROR] Aborting

140619 23:12:10 [Note] /usr/sbin/mysqld: Shutdown complete

140619 23:12:11 [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.
140619 23:12:11 [Note] Plugin 'FEDERATED' is disabled.
140619 23:12:11 InnoDB: The InnoDB memory heap is disabled
140619 23:12:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140619 23:12:11 InnoDB: Compressed tables use zlib 1.2.3.4
140619 23:12:11 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140619 23:12:11 InnoDB: Completed initialization of buffer pool
140619 23:12:11 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140619 23:12:11 [ERROR] Plugin 'InnoDB' init function returned error.
140619 23:12:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140619 23:12:11 [ERROR] Unknown/unsupported storage engine: InnoDB
140619 23:12:11 [ERROR] Aborting

140619 23:12:11 [Note] /usr/sbin/mysqld: Shutdown complete

140620  0:37:36 [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.
140620  0:37:36 [Note] Plugin 'FEDERATED' is disabled.
140620  0:37:36 InnoDB: The InnoDB memory heap is disabled
140620  0:37:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140620  0:37:36 InnoDB: Compressed tables use zlib 1.2.3.4
140620  0:37:36 InnoDB: Initializing buffer pool, size = 128.0M
140620  0:37:36 InnoDB: Completed initialization of buffer pool
140620  0:37:36 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1072329170
140620  0:37:36  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...
InnoDB: Doing recovery: scanned up to log sequence number 1072330346
140620  0:37:36  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
140620  0:37:37  InnoDB: Waiting for the background threads to start
140620  0:37:38 InnoDB: 5.5.35 started; log sequence number 1072330346
140620  0:37:38 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
140620  0:37:38 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
140620  0:37:38 [Note] Server socket created on IP: '127.0.0.1'.
140620  0:37:38 [Note] Event Scheduler: Loaded 0 events
140620  0:37:38 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.35-0ubuntu0.12.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './2mbetterfutures/wp_options' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './2mbetterfutures/wp_options'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './2mbetterfutures/wp_postmeta' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './2mbetterfutures/wp_postmeta'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './2mbetterfutures/wp_posts' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './2mbetterfutures/wp_posts'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './2mbetterfutures/wp_rg_form_view' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './2mbetterfutures/wp_rg_form_view'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './delawarebasindrinkingwater/asd235_options' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './delawarebasindrinkingwater/asd235_options'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './delawarebasindrinkingwater/asd235_rg_form_view' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './delawarebasindrinkingwater/asd235_rg_form_view'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './delawarebasindrinkingwater/asd235_rpf_log' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './delawarebasindrinkingwater/asd235_rpf_log'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './realmenrealfires/z_answers' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './realmenrealfires/z_answers'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './realmenrealfires/z_events' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './realmenrealfires/z_events'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './realmenrealfires/z_my_users' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './realmenrealfires/z_my_users'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './realmenrealfires/z_options' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './realmenrealfires/z_options'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './realmenrealfires/z_rg_form_view' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './realmenrealfires/z_rg_form_view'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './smc_tbep_befloridian/asd235_options' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './smc_tbep_befloridian/asd235_options'
140620  0:37:39 [ERROR] /usr/sbin/mysqld: Table './smc_tbep_befloridian/asd235_rg_form_view' is marked as crashed and should be repaired
140620  0:37:39 [Warning] Checking table:   './smc_tbep_befloridian/asd235_rg_form_view'

errno 12 действительно означает Cannot allocate memory, значит, вам почему-то не хватает памяти. Вам следует уменьшить потребление памяти виртуальной машиной или выделить ей больше памяти.