3

I did read and followed these 2 posts:

but I still get this error:

Jun 18 06:06:32 hamid kernel: [42478.128706] Out of memory: Kill process 25316 (mysqld) score 231 or sacrifice child
Jun 18 06:06:32 hamid kernel: [42478.136353] Killed process 25316 (mysqld) total-vm:1354312kB, anon-rss:291300kB, file-rss:0kB, shmem-rss:0kB
Jun 18 06:06:32 hamid kernel: [42478.212879] oom_reaper: reaped process 25316 (mysqld), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

I have 1GB RAM VPS (running WooCommerce site by Virtualmin) and I’m not sure if it’s enough memory.

MySQL config:

[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld] 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 performance_schema = off

bind-address = 127.0.0.1

key_buffer_size = 16M max_allowed_packet = 64M thread_stack = 192K thread_cache_size = 8

myisam-recover-options = BACKUP

query_cache_limit = 2M query_cache_size = 64M query_cache_type = 1

log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M default-storage-engine = InnoDB

innodb_buffer_pool_size= 250M

and did run mysqltuner , give this :

-------- Recommendations -------------------------------------------------------                                                  --------------------
General recommendations:
    Control warning line(s) into /var/log/mysql/error.log file
    Control error line(s) into /var/log/mysql/error.log file
    MySQL started within last 24 hours - recommendations may be inaccurate
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries which have no LIMIT clause
Variables to adjust:
    query_cache_size (=0)
    query_cache_type (=0)
    query_cache_limit (> 2M, or use smaller result sets)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    innodb_log_file_size * innodb_log_files_in_group should be equal to 1/4 of buffer pool size (=128M) if possible.

In Virtualmin resource usage, before the crash happens my CPU and swap are 100%, and RAM is 50%.

Melebius
  • 11,431
  • 9
  • 52
  • 78

3 Answers3

1

in virualmin resource usage , before crash happen my cpu and swap is 100% , and ram is 50%

These values definitely mean your RAM value is too low. You should watch the current RAM usage together with swap usage as the OS is swapping in advance when there is a risk of RAM exhaustion.

Swap is generally used when RAM is exhausted. Swap is a (slower) substitute of RAM when there is not enough RAM available, so a server should not really use swap. (Its real long-term usage could be something like 1 or 2 %.)

Melebius
  • 11,431
  • 9
  • 52
  • 78
0

i increased swap size and i think problem solved

0

I'm running ETH Validator on NUC 12th Gen i7 /32GB / m.2 2TB for validator / SSD 500GB for a Windows 11 Pro system and a VM with latest version of Ubuntu by this guide. Every 24 hours all my validators are down and I'm getting this.

Killed process:

Killed Process

karel
  • 114,770
alesk76
  • 1
  • 1