Johan Scheepers
Johan Scheepers

Reputation: 133

AWS - RDS - MySQL - out of memory

I am running a MySQL instance with the following settings:

db.t2.micro vCPU 1 1 GB 20G Free Space 19404.5546875 14 tables Biggest table have about 2000 records All the rest - 3 to 10 records

So this is the smallest (using it for testing) but it were running fine until yesterday (2021-02-13).

I do use a few inner joins this one below been the one with the most. I were able to run it previously but now it just timeout and uses a few G to do it. Any suggestions?

'''Select U.sen_id,
    U.dev_id,
    U.sen_comment,
    t1.tl_value as lat,
    t2.tl_value as lon,
    t3.tl_value as alt,
    t4.tl_value as speed,
    t5.tl_value as batv,
    t5.tl_value as deg,
    t1.time as times
    From user_device U
    INNER JOIN tracker_lat_lon t1 ON t1.sen_id = U.sen_id AND t1.tl_id = 1
    INNER JOIN tracker_lat_lon t2 ON t2.sen_id = U.sen_id AND t2.tl_id = 2
    INNER JOIN tracker_lat_lon t3 ON t3.sen_id = U.sen_id AND t3.tl_id = 3
    INNER JOIN tracker_lat_lon t4 ON t4.sen_id = U.sen_id AND t4.tl_id = 4
    INNER JOIN tracker_lat_lon t5 ON t5.sen_id = U.sen_id AND t5.tl_id = 5
    INNER JOIN tracker_lat_lon t6 ON t6.sen_id = U.sen_id AND t6.tl_id = 6
    Where t1.sen_id = (SELECT UD.sen_id
    FROM user_device UD
    WHERE UD.dev_id = 'xxxxxxxx')
    ORDER BY t1.time DESC LIMIT 1 '''

AWS Metrics

Upvotes: 2

Views: 554

Answers (1)

Asri Badlah
Asri Badlah

Reputation: 2123

You need to identify the source of the memory utilization, and troubleshoot low freeable memory, check the following link: here

Upvotes: 2

Related Questions