Does it slow down before it crashes? How big is the swap file? How much RAM is available to MySQL?
Can you post the result of this qty?
innodb_ft_total_cache_size +
innodb_additional_mem_pool_size +
innodb_log_buffer_size +
tmp_table_size +
key_buffer_size +
max_connections * (
thread_stack
+ max( max_allowed_packet, net_buffer_length )
+ net_buffer_length
+ read_buffer_size
+ read_rnd_buffer_size
+ sort_buffer_size
+ join_buffer_size
)
and the result of this query ...
select engine,data,indexes,total
from (
select
ifnull(engine,'TOTALS') as engine,
concat(data,' GB') as data,
concat(indexes,' GB') as indexes,
concat(tot,' GB') as total,
if(engine is null,-1,tot) as ord
from (
select
engine,
round( sum(data_length)/1024/1024/1024, 2 ) as data,
round( sum(index_length)/1024/1024/1024, 2 ) as indexes,
round( sum(data_length+index_length)/1024/1024/1024, 2 ) as tot
from information_schema.tables
where engine is not null and engine not in('information_schema','performance_schema')
group by engine with rollup
) sums
) list
order by list.ord desc;
Or alternatively run the process described under "Optimisation cheatsheet" at
https://www.artfulsoftware.com/infotree/mysqltips.php and post the result inside BBCode code tags.