Поддержка Проблемы и решения No such file or directory

  • Всем доброй ночи. Нужна помощь специалистов, так как постоянно ловим краш по блогу и уже не понимаем что нужно изменить. И вот наш новый краш:

    Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1653
    No such file or directory

    Вроде нашел сообщение, что это может быть связано с памятью сервиса, но вот на сервер грех жаловать, его данные:

    == Server Environment ==
    Operating System: Linux
    Software: Apache/2.4.29 (Ubuntu)
    MySQL version: (Ubuntu) v5.7.32
    PHP Version: 7.2.24-0ubuntu0.18.04.7
    PHP Max Input Vars: 1000
    PHP Max Post Size: 750M
    GD Installed: Yes
    ZIP Installed: Yes
    Write Permissions: All right
    Elementor Library: Connected

    == WordPress Environment ==
    Version: 5.6
    Site URL: https://yosa.run
    Home URL: https://yosa.run
    WP Multisite: No
    Max Upload Size: 750 МБ
    Memory limit: 256M
    Permalink Structure: /%postname%/
    Language: ru-RU
    Timezone: 3

    Debug Mode: Active

    Разработчики плагина Элементор рекомендовали увеличить Memory limit: 256M на 512 что и было сделано при раних крашах, теперь появился новый. Нужна помощь профессионалов. Заранее благодарю!!!

    • Тема изменена 3 года, 3 месяца назад пользователем Yui. Причина: email removed

    Страница, с которой нужна помощь: [войдите, чтобы увидеть ссылку]

Просмотр 15 ответов — с 1 по 15 (всего 18)
  • Модератор Yui

    (@fierevere)

    永子

    с памятью это может быть связано только в том случае, если mysql сервер не может выделить себе память и отклоняет подключение по сокету.

    Убедитесь что в wp-config.php указаны корректные данные для базы данных.
    Попробуйте сменить сокет на TCP ( значение DB_HOST с localhost на 127.0.0.1 )

    Если хостинг — обращайтесь в его техподдержку,
    если сервер свой, то убедитесь что
    * на сервере достаточно оперативной памяти.
    * mysqld способен принимать достаточно подключений или ставить их в очередь (см my.cnf )
    max_connections (макс число подключений)
    thread_cache_size (число потоков mysqld в ожидании)
    back_log (очередь подключений), можно установить на максимум
    back_log = 65535

    также смотрите лог ошибок mysql, возможно там будут еще вообщения о проблемах, которые нужно исправить.

    То есть при данной ошибки вы рекомендуете в первую очередь просмотреть все на сервере?

    Модератор Yui

    (@fierevere)

    永子

    «все» это сильно сказано

    Ошибка связана с тем, что попытка подключиться к MySQL неудачна,
    причина — либо wp-config.php с неверно указанными параметрами БД,
    либо MySQL сервер не принимает подключения к сокету по каким-то своим причинам, частично указанным выше.

    Добрый день, внесли все настройки в mysql как вы советовали, но блог все равно крашится. Можете еще что-то посоветовать?

    Лог ошибок БД:

    2021-01-04T10:38:59.329487Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 12877ms. The settings might not be optimal. (flushed=6 and evicted=0, during the time.)
    2021-01-04T12:50:19.577238Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:19.577411Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:19.577429Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:19.579404Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23271 ...
    2021-01-04T12:50:19.579454Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:19.579456Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:19.584999Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:19.585033Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:19.585038Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:19.585042Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:19.585045Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:19.585049Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:19.585985Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:19.588334Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:19.591202Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:19.626659Z 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-01-04T12:50:19.635668Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    2021-01-04T12:50:19.650742Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    2021-01-04T12:50:19.659114Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6620732490
    2021-01-04T12:50:19.659138Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6620732499
    2021-01-04T12:50:19.659143Z 0 [Note] InnoDB: Database was not shutdown normally!
    2021-01-04T12:50:19.659147Z 0 [Note] InnoDB: Starting crash recovery.
    2021-01-04T12:50:19.998731Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2021-01-04T12:50:19.998763Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-01-04T12:50:19.998810Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-01-04T12:50:20.028094Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-01-04T12:50:20.028891Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    2021-01-04T12:50:20.028907Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    2021-01-04T12:50:20.029218Z 0 [Note] InnoDB: Waiting for purge to start
    2021-01-04T12:50:20.080007Z 0 [Note] InnoDB: 5.7.32 started; log sequence number 6620732499
    2021-01-04T12:50:20.080293Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    2021-01-04T12:50:20.080880Z 0 [Note] Plugin 'FEDERATED' is disabled.
    2021-01-04T12:50:20.100307Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
    2021-01-04T12:50:20.100330Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
    2021-01-04T12:50:20.102749Z 0 [Warning] CA certificate ca.pem is self signed.
    2021-01-04T12:50:20.103451Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
    2021-01-04T12:50:20.103881Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
    2021-01-04T12:50:20.103893Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
    2021-01-04T12:50:20.103925Z 0 [Note] Server socket created on IP: '127.0.0.1'.
    2021-01-04T12:50:20.148619Z 0 [Note] Event Scheduler: Loaded 0 events
    2021-01-04T12:50:20.148877Z 0 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.7.32-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
    2021-01-04T12:50:20.884260Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210104 12:50:20
    2021-01-04T12:50:35.063594Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:35.063714Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:35.063731Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:35.065659Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23349 ...
    2021-01-04T12:50:35.065705Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:35.065707Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:35.071616Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:35.071647Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:35.071652Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:35.071656Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:35.071659Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:35.071663Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:35.072640Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:35.074983Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:35.077678Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:35.098047Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
    2021-01-04T12:50:35.103474Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2021-01-04T12:50:35.103512Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2021-01-04T12:50:35.103522Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2021-01-04T12:50:35.103526Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2021-01-04T12:50:35.103532Z 0 [ERROR] Failed to initialize builtin plugins.
    2021-01-04T12:50:35.103536Z 0 [ERROR] Aborting
    
    2021-01-04T12:50:35.104748Z 0 [Note] Binlog end
    2021-01-04T12:50:35.104795Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T12:50:35.105057Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T12:50:35.676127Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:35.676293Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:35.676311Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:35.678176Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23389 ...
    2021-01-04T12:50:35.678224Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:35.678226Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:35.682578Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:35.682611Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:35.682616Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:35.682619Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:35.682623Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:35.682638Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:35.682875Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:35.682983Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:35.686313Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:35.706300Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
    2021-01-04T12:50:35.711713Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2021-01-04T12:50:35.711750Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2021-01-04T12:50:35.711759Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2021-01-04T12:50:35.711764Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2021-01-04T12:50:35.711770Z 0 [ERROR] Failed to initialize builtin plugins.
    2021-01-04T12:50:35.711773Z 0 [ERROR] Aborting
    
    2021-01-04T12:50:35.713263Z 0 [Note] Binlog end
    2021-01-04T12:50:35.713312Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T12:50:35.713901Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T12:50:36.192900Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:36.193020Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:36.193037Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:36.194904Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23432 ...
    2021-01-04T12:50:36.194950Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:36.194952Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:36.199323Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:36.199348Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:36.199352Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:36.199355Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:36.199358Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:36.199362Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:36.199661Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:36.199773Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:36.202632Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:36.222798Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
    2021-01-04T12:50:36.228290Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2021-01-04T12:50:36.228336Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2021-01-04T12:50:36.228344Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2021-01-04T12:50:36.228349Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2021-01-04T12:50:36.228354Z 0 [ERROR] Failed to initialize builtin plugins.
    2021-01-04T12:50:36.228357Z 0 [ERROR] Aborting
    
    2021-01-04T12:50:36.230532Z 0 [Note] Binlog end
    2021-01-04T12:50:36.230584Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T12:50:36.230879Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T12:50:36.696497Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:36.696614Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:36.696631Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:36.698507Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23481 ...
    2021-01-04T12:50:36.698555Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:36.698557Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:36.703224Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:36.703246Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:36.703250Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:36.703254Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:36.703257Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:36.703260Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:36.703500Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:36.703608Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:36.705824Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:36.725618Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
    2021-01-04T12:50:36.730818Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2021-01-04T12:50:36.730848Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2021-01-04T12:50:36.730857Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2021-01-04T12:50:36.730861Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2021-01-04T12:50:36.730866Z 0 [ERROR] Failed to initialize builtin plugins.
    2021-01-04T12:50:36.730869Z 0 [ERROR] Aborting
    
    2021-01-04T12:50:36.733200Z 0 [Note] Binlog end
    2021-01-04T12:50:36.733271Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T12:50:36.734035Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T12:50:37.184485Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T12:50:37.184605Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T12:50:37.184623Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T12:50:37.186519Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23524 ...
    2021-01-04T12:50:37.186566Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T12:50:37.186569Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T12:50:37.191070Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T12:50:37.191108Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T12:50:37.191112Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T12:50:37.191115Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T12:50:37.191119Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T12:50:37.191122Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T12:50:37.191390Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T12:50:37.191500Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T12:50:37.193614Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T12:50:37.214302Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
    2021-01-04T12:50:37.219516Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2021-01-04T12:50:37.219548Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    2021-01-04T12:50:37.219556Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2021-01-04T12:50:37.219561Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2021-01-04T12:50:37.219566Z 0 [ERROR] Failed to initialize builtin plugins.
    2021-01-04T12:50:37.219569Z 0 [ERROR] Aborting
    
    2021-01-04T12:50:37.220541Z 0 [Note] Binlog end
    2021-01-04T12:50:37.220586Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T12:50:37.220862Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T13:10:24.679183Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T13:10:24.679309Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T13:10:24.679334Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T13:10:24.681360Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 23913 ...
    2021-01-04T13:10:24.681415Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T13:10:24.681418Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T13:10:24.686143Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T13:10:24.686175Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T13:10:24.686180Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T13:10:24.686183Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T13:10:24.686187Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T13:10:24.686191Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T13:10:24.686435Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T13:10:24.686572Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T13:10:24.690174Z 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
    2021-01-04T13:10:24.726124Z 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-01-04T13:10:24.735535Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    2021-01-04T13:10:24.751754Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    2021-01-04T13:10:24.760825Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6620732518
    2021-01-04T13:10:24.760856Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6620732527
    2021-01-04T13:10:24.760861Z 0 [Note] InnoDB: Database was not shutdown normally!
    2021-01-04T13:10:24.760866Z 0 [Note] InnoDB: Starting crash recovery.
    2021-01-04T13:10:25.129467Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2021-01-04T13:10:25.129498Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-01-04T13:10:25.129542Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-01-04T13:10:25.150454Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-01-04T13:10:25.151329Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    2021-01-04T13:10:25.151348Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    2021-01-04T13:10:25.151705Z 0 [Note] InnoDB: Waiting for purge to start
    2021-01-04T13:10:25.202377Z 0 [Note] InnoDB: 5.7.32 started; log sequence number 6620732527
    2021-01-04T13:10:25.202654Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    2021-01-04T13:10:25.203245Z 0 [Note] Plugin 'FEDERATED' is disabled.
    2021-01-04T13:10:25.214277Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
    2021-01-04T13:10:25.214299Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
    2021-01-04T13:10:25.215785Z 0 [Warning] CA certificate ca.pem is self signed.
    2021-01-04T13:10:25.215831Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
    2021-01-04T13:10:25.216275Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
    2021-01-04T13:10:25.216291Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
    2021-01-04T13:10:25.216322Z 0 [Note] Server socket created on IP: '127.0.0.1'.
    2021-01-04T13:10:25.259601Z 0 [Note] Event Scheduler: Loaded 0 events
    2021-01-04T13:10:25.259897Z 0 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.7.32-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
    2021-01-04T13:10:25.909409Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210104 13:10:25
    2021-01-04T14:29:11.116350Z 0 [Note] Giving 0 client threads a chance to die gracefully
    2021-01-04T14:29:11.116388Z 0 [Note] Shutting down slave threads
    2021-01-04T14:29:11.116397Z 0 [Note] Forcefully disconnecting 0 remaining clients
    2021-01-04T14:29:11.116405Z 0 [Note] Event Scheduler: Purging the queue. 0 events
    2021-01-04T14:29:11.117250Z 0 [Note] Binlog end
    2021-01-04T14:29:11.120050Z 0 [Note] Shutting down plugin 'auth_socket'
    2021-01-04T14:29:11.120082Z 0 [Note] Shutting down plugin 'ngram'
    2021-01-04T14:29:11.120087Z 0 [Note] Shutting down plugin 'partition'
    2021-01-04T14:29:11.120091Z 0 [Note] Shutting down plugin 'BLACKHOLE'
    2021-01-04T14:29:11.120095Z 0 [Note] Shutting down plugin 'ARCHIVE'
    2021-01-04T14:29:11.120098Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    2021-01-04T14:29:11.120128Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
    2021-01-04T14:29:11.120132Z 0 [Note] Shutting down plugin 'MyISAM'
    2021-01-04T14:29:11.120140Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
    2021-01-04T14:29:11.120144Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    2021-01-04T14:29:11.120147Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    2021-01-04T14:29:11.120150Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    2021-01-04T14:29:11.120153Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    2021-01-04T14:29:11.120156Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    2021-01-04T14:29:11.120159Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    2021-01-04T14:29:11.120161Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    2021-01-04T14:29:11.120164Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    2021-01-04T14:29:11.120167Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    2021-01-04T14:29:11.120170Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    2021-01-04T14:29:11.120173Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    2021-01-04T14:29:11.120176Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    2021-01-04T14:29:11.120179Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    2021-01-04T14:29:11.120181Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    2021-01-04T14:29:11.120184Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    2021-01-04T14:29:11.120187Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
    2021-01-04T14:29:11.120190Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
    2021-01-04T14:29:11.120193Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    2021-01-04T14:29:11.120195Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    2021-01-04T14:29:11.120198Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    2021-01-04T14:29:11.120201Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    2021-01-04T14:29:11.120204Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    2021-01-04T14:29:11.120207Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    2021-01-04T14:29:11.120210Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
    2021-01-04T14:29:11.120212Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    2021-01-04T14:29:11.120215Z 0 [Note] Shutting down plugin 'INNODB_CMP'
    2021-01-04T14:29:11.120299Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    2021-01-04T14:29:11.120304Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
    2021-01-04T14:29:11.120307Z 0 [Note] Shutting down plugin 'INNODB_TRX'
    2021-01-04T14:29:11.120310Z 0 [Note] Shutting down plugin 'InnoDB'
    2021-01-04T14:29:11.120425Z 0 [Note] InnoDB: FTS optimize thread exiting.
    2021-01-04T14:29:11.120592Z 0 [Note] InnoDB: Starting shutdown...
    2021-01-04T14:29:11.221000Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
    2021-01-04T14:29:11.222060Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 210104 14:29:11
    2021-01-04T14:29:12.347465Z 0 [Note] InnoDB: Shutdown completed; log sequence number 6621694742
    2021-01-04T14:29:12.347574Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2021-01-04T14:29:12.347586Z 0 [Note] Shutting down plugin 'MEMORY'
    2021-01-04T14:29:12.347591Z 0 [Note] Shutting down plugin 'CSV'
    2021-01-04T14:29:12.347597Z 0 [Note] Shutting down plugin 'sha256_password'
    2021-01-04T14:29:12.347600Z 0 [Note] Shutting down plugin 'mysql_native_password'
    2021-01-04T14:29:12.347775Z 0 [Note] Shutting down plugin 'binlog'
    2021-01-04T14:29:12.348154Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    
    2021-01-04T14:29:12.675951Z 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.
    2021-01-04T14:29:12.676108Z 0 [Warning] option 'slow_query_log': boolean value '/var/log/mysql/mysql-slow.log' wasn't recognized. Set to OFF.
    2021-01-04T14:29:12.676294Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2021-01-04T14:29:12.678733Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.18.04.1) starting as process 27144 ...
    2021-01-04T14:29:12.678813Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/english/.
    2021-01-04T14:29:12.678817Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
    2021-01-04T14:29:12.684405Z 0 [Note] InnoDB: PUNCH HOLE support available
    2021-01-04T14:29:12.684441Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-01-04T14:29:12.684445Z 0 [Note] InnoDB: Uses event mutexes
    2021-01-04T14:29:12.684449Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2021-01-04T14:29:12.684452Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-01-04T14:29:12.684455Z 0 [Note] InnoDB: Using Linux native AIO
    2021-01-04T14:29:12.684735Z 0 [Note] InnoDB: Number of pools: 1
    2021-01-04T14:29:12.684847Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2021-01-04T14:29:12.687475Z 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
    2021-01-04T14:29:12.705109Z 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-01-04T14:29:12.709624Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    2021-01-04T14:29:12.725738Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    2021-01-04T14:29:12.874861Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-01-04T14:29:12.874941Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-01-04T14:29:13.202301Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-01-04T14:29:13.203079Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    2021-01-04T14:29:13.203094Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    2021-01-04T14:29:13.203888Z 0 [Note] InnoDB: 5.7.32 started; log sequence number 6621694742
    2021-01-04T14:29:13.204124Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    2021-01-04T14:29:13.204170Z 0 [Note] Plugin 'FEDERATED' is disabled.
    2021-01-04T14:29:13.212775Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
    2021-01-04T14:29:13.212797Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
    2021-01-04T14:29:13.213326Z 0 [Warning] CA certificate ca.pem is self signed.
    2021-01-04T14:29:13.213359Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
    2021-01-04T14:29:13.213459Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
    2021-01-04T14:29:13.213478Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
    2021-01-04T14:29:13.213508Z 0 [Note] Server socket created on IP: '127.0.0.1'.
    2021-01-04T14:29:13.229439Z 0 [Note] Event Scheduler: Loaded 0 events
    2021-01-04T14:29:13.229694Z 0 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.7.32-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
    2021-01-04T14:29:14.089276Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210104 14:29:14
    Модератор Yui

    (@fierevere)

    永子

    в вашем логе идет слишком частый перезапуск mysqld, и не всегда удачный, т.к. ему не всегда удается получить достаточно памяти.

    Сколько у вас оперативной памяти на сервере? Возможно нужно увеличивать

    У нас 2Гб — оперативной

    Что пишется в здоровье сайта? Если установите новый вордпрес в новой папке, с новой базой, тоже будет так крошиться?

    Модератор Yui

    (@fierevere)

    永子

    покажите тогда /etc/mysql/my.cnf
    (а если он включает другие файлы то и их содержимое,
    например из /etc/mysql/my.conf.d)

    и скриншот htop или хотя бы top
    (после запуска top нажмите shift+m чтобы включить сортировку по использованию памяти)

    Скрин htop — http://joxi.ru/KAgG1eWcEBn01A

    my.cnf:

    port                        = 3306
    socket                      = /var/run/mysqld/mysqld.sock
    
    socket                      = /var/run/mysqld/mysqld.sock
    nice                        = 0
    
    user                        = mysql
    pid-file                    = /var/run/mysqld/mysqld.pid
    socket                      = /var/run/mysqld/mysqld.sock
    port                        = 3306
    basedir                     = /usr
    datadir                     = /var/lib/mysql
    tmpdir                      = /tmp
    language                    = /usr/share/mysql/english
    old_passwords               = 0
    bind-address                = 127.0.0.1
    
    skip-external-locking
    
    max_allowed_packet          = 16M
    key_buffer_size             = 16M
    #512M
    innodb_buffer_pool_size     = 256M
    innodb_file_per_table       = 1
    innodb_flush_method         = O_DIRECT
    innodb_flush_log_at_trx_commit  = 0
    #132
    max_connections             = 200
    
    		query_cache_size            = 0
    
    slow_query_log              = /var/log/mysql/mysql-slow.log
    long_query_time             = 1
    
    expire_logs_days            = 10
    max_binlog_size             = 100M
    
    quick
    quote-names
    max_allowed_packet          = 16M
    
    thread_cache_size = 20
    back_log = 65535

    mysqld.cnf:

    [mysqld_safe]
    socket		= /var/run/mysqld/mysqld.sock
    nice		= 0
    
    [mysqld]
    #
    # * Basic Settings
    #
    user		= mysql
    pid-file	= /var/run/mysqld/mysqld.pid
    socket		= /var/run/mysqld/mysqld.sock
    port		= 3306
    basedir		= /usr
    datadir		= /var/lib/mysql
    tmpdir		= /tmp
    lc-messages-dir	= /usr/share/mysql
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address		= 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer_size		= 16M
    max_allowed_packet	= 16M
    thread_stack		= 192K
    thread_cache_size       = 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover-options  = BACKUP
    #max_connections        = 100
    #table_open_cache       = 64
    #thread_concurrency     = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit	= 1M
    query_cache_size        = 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file        = /var/log/mysql/mysql.log
    #general_log             = 1
    #
    # Error log - should be very few entries.
    #
    log_error = /var/log/mysql/error.log
    #
    # Here you can see queries with especially long duration
    #slow_query_log		= 1
    #slow_query_log_file	= /var/log/mysql/mysql-slow.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    #       other settings you may need to change.
    #server-id		= 1
    #log_bin			= /var/log/mysql/mysql-bin.log
    expire_logs_days	= 10
    max_binlog_size   = 100M
    #binlog_do_db		= include_database_name
    #binlog_ignore_db	= include_database_name

    У нас 2Гб — оперативной

    Свой сервер и всего-лишь 2 Гб оперативки? Сейчас можно найти обычный шаред хостинг с такой-же памятью. У блога большая посещаемость? Какой расход оперативной памяти? Обычный шаред хостинг Ваш сайт не потянет?

    Разработчики плагина Элементор рекомендовали увеличить Memory limit

    С этим плагином часто проблемы возникают, лучше отказаться от элементора.

    Модератор Yui

    (@fierevere)

    永子

    попробуйте так, сохраните ваш my.cnf себе на всякий случай, поменяйте его так.

    thread_stack = 192K
    < убрать

    thread_cache_size
    установить на 2, 8 много, 20 определенно может приводить к проблемам.

    key_buffer_size = 16M
    innodb_buffer_pool_size = 256M
    innodb_file_per_table = 1
    innodb_flush_method = O_DIRECT
    innodb_flush_log_at_trx_commit = 0
    уберите эти директивы, пусть конфигурируется автоматически.

    max_connections = 200
    очень большое значение резервирует много памяти.
    не хочется ставить мало, но попробуйте 64
    да это приведет к ошибкам подобной вашей по превышении лимита подключений, зато защитит mysqld от пожирания слишком большого количества памяти.

    по htop, потребление памяти не на пределе, резервы есть, но вопрос не бывает ли пиков потребления памяти со стороны apache, когда на mysql памяти уже не остается.

    Хорошо еще попробовать на VPS увеличить количество памяти и посмотреть как будет, обычно достаточно ползунок передвинуть в настройках VPS.

    Ну и да, любой сервер нужно настраивать и чувствовать его конфигурацию и возможности, также важно устанавливать лимиты количества процессов и потребляемой ими памяти.
    Или же и правда проще будет на хостинг обычный сбежать.

    Кстати отсутствие swap как такового может приводить к проблемам, попробуйте создать, если в файл то 512М — 1Гб, даже 256M свап в zram может улучшить ситуацию.

    Поняли, спасибо всем за помощь!
    Будем править конфигурацию и увеличивать оперативу

    Модератор Yui

    (@fierevere)

    永子

    swap создайте, серьезно, хотя бы номинальный,
    я не первый раз вижу когда вроде при наличии свободной памяти,
    система начинает вставать колом и тупить при отсутствии свапа.

    Свой сервер и всего-лишь 2 Гб оперативки? Сейчас можно найти обычный шаред хостинг с такой-же памятью. У блога большая посещаемость? Какой расход оперативной памяти? Обычный шаред хостинг Ваш сайт не потянет?

    У блога большая посещаемость? — сейчас от 100 до 200 уников в день

    Модератор Yui

    (@fierevere)

    永子

    сейчас от 100 до 200 уников в день

    это немного. А почему тогда VPS? Интересно.
    Хочется что-то самостоятельно сделать? Но у вас вроде все стандартненько, Ubuntu, Apache2, MySQL

Просмотр 15 ответов — с 1 по 15 (всего 18)
  • Тема «No such file or directory» закрыта для новых ответов.