Hello people,
I created a dashboard, which you can do messurements with at the Raspberry Pi. The results are getting displayed in a table and saved inside a MySQL database. The user is also able to download the database as CSV.
I almost finished with the project and made a stresstest. So what I did was to do one messurement every 200ms á 50 messuring instruments for one hour. As expected I got around 900.000 rows and a total size of 50MB. Since then whenever I'm trying to load the dashboard it freezes and nothing is working. The CPU goes sometimes up to 200-300%. I've disabled the table so no data is getting loaded by the database.
Without the table it is working fine again but when I try to download the CSV it freezes again. So I logged the MySQL slow queries to a file and got this:
/usr/sbin/mysqld, Version: 10.3.34-MariaDB-0+deb10u1-log (Raspbian 10). started with:
Tcp port: 0 Unix socket: /run/mysqld/mysqld.sock
Time Id Command Argument
# Time: 220923 15:22:27
# User@Host: nodered[nodered] @ localhost [127.0.0.1]
# Thread_id: 36 Schema: devices QC_hit: No
# Query_time: 2.656102 Lock_time: 0.001574 Rows_sent: 879100 Rows_examined: 879100
# Rows_affected: 0 Bytes_sent: 19673746
use devices;
SET timestamp=1663939347;
SELECT * FROM Messungen;
So I tried to get the database manually over the console.. with success.
Is there anything I can set up in node-RED? Why does node-RED freezes all the time (I mean 50MBs are nothing)?
Thanks in advance
Justin