This may seem a newbie-related question, but I can't find any relevant log in order to trace the bottleneck.
5 GB RAM
512M Swap.
Fresh install of wordpress, using clean template + plugins on custom VPS (centos 7)
I'm hosting 5 wordpresses (not so accessed - maximum 15/20 per website) on this VPS. For this specific site, database is going down after 3 or 4 refreshes (mostly; unknown PoC)
Database load, server load and memory aren't high. The database's IP isn't flooded.
Output of sudo netstat -plt
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:bhfhs 0.0.0.0:* LISTEN 9919/sshd
tcp 0 0 localhost:rndc 0.0.0.0:* LISTEN 32110/named
tcp 0 0 0.0.0.0:smtp 0.0.0.0:* LISTEN 867/exim
tcp 0 0 sub.domain.com:https 0.0.0.0:* LISTEN 29089/nginx: master
tcp 0 0 sub.domai:pcsync-https 0.0.0.0:* LISTEN 24695/httpd
tcp 0 0 0.0.0.0:ms-v-worlds 0.0.0.0:* LISTEN 867/exim
tcp 0 0 0.0.0.0:imaps 0.0.0.0:* LISTEN 926/dovecot
tcp 0 0 0.0.0.0:pop3s 0.0.0.0:* LISTEN 926/dovecot
tcp 0 0 0.0.0.0:submission 0.0.0.0:* LISTEN 867/exim
tcp 0 0 localhost:dyna-access 0.0.0.0:* LISTEN 28499/clamd
tcp 0 0 0.0.0.0:pop3 0.0.0.0:* LISTEN 926/dovecot
tcp 0 0 localhost:783 0.0.0.0:* LISTEN 16452/spamd.pid -d
tcp 0 0 0.0.0.0:imap 0.0.0.0:* LISTEN 926/dovecot
tcp 0 0 sub.domain.com:http 0.0.0.0:* LISTEN 29089/nginx: master
tcp 0 0 sub.domain:webcache 0.0.0.0:* LISTEN 24695/httpd
tcp 0 0 localhost:tproxy 0.0.0.0:* LISTEN 24695/httpd
tcp 0 0 0.0.0.0:urd 0.0.0.0:* LISTEN 867/exim
tcp 0 0 0.0.0.0:us-srv 0.0.0.0:* LISTEN 904/nginx: master p
tcp 0 0 localhost:8084 0.0.0.0:* LISTEN 29089/nginx: master
tcp 0 0 sub.domain.c:domain 0.0.0.0:* LISTEN 32110/named
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN 32110/named
tcp 0 0 0.0.0.0:ftp 0.0.0.0:* LISTEN 865/vsftpd
tcp6 0 0 [::]:bhfhs [::]:* LISTEN 9919/sshd
tcp6 0 0 localhost:rndc [::]:* LISTEN 32110/named
tcp6 0 0 localhost:783 [::]:* LISTEN 16452/spamd.pid -d
tcp6 0 0 [::]:domain [::]:* LISTEN 32110/named
Checked MariaDB logs (memory issues; memory increased to 5 GB RAM from 3 GB)
Version: '5.5.64-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
200224 21:24:52 mysqld_safe Number of processes running now: 0
200224 21:24:52 mysqld_safe mysqld restarted
200224 21:24:53 InnoDB: The InnoDB memory heap is disabled
200224 21:24:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200224 21:24:53 InnoDB: Compressed tables use zlib 1.2.7
200224 21:24:53 InnoDB: Using Linux native AIO
200224 21:24:53 [Note] /usr/libexec/mysqld (mysqld 5.5.64-MariaDB) starting as process 28651 ...
200224 21:24:53 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
200224 21:24:53 InnoDB: Completed initialization of buffer pool
200224 21:24:53 InnoDB: Fatal error: cannot allocate memory for the buffer pool
200224 21:24:53 [ERROR] Plugin 'InnoDB' init function returned error.
200224 21:24:53 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
200224 21:24:53 [Note] Plugin 'FEEDBACK' is disabled.
200224 21:24:53 [ERROR] Unknown/unsupported storage engine: InnoDB
200224 21:24:53 [ERROR] Aborting
200224 21:24:53 [Note] /usr/libexec/mysqld: Shutdown complete
200224 21:24:53 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Logged before increasing memory.
Still goes down, but MariaDB doesn't log anything. Now it's going down for maximum one minute, then it comes back. Before increasing the memory, the mysqld service stopped working. [Link to mysql logging as VestaCP Graph]
Note: mysql goes down after accessing Visual Composer (which can't load because of header X-Content-Type-Options: nosniff
)
I don't have any ideas on this, so any help would be so appreciated. Thanks!