[Résolu] Plantage de Gladys par moment (table pleine / ER_RECORD_FILE_FULL: The table 'event' is full)


#1

Bonjour à tous.

Voici un bon mois que Gladys plante de temps en temps.

Quand cela se produit, je m’en rend compte car le matin, les volets ne se sont pas ouvert pas au lever du soleil et rien ne se passe lorsque j’appuie sur les boutons Xiaomi.

Or :
La gateway Xiaomi fonctionne bien (tout est OK coté application Xiaomi)
Mes IPX800 aussi (pilotable sans problème via leurs interfaces ou via Imperihome

Le problème semble donc venir de Gladys qui crash de temps en temps. A moins que cela ne vienne d’un module ?

Quand cela se produit, un reboot du pi suffit et tout rentre dans l’ordre. Cela n’est donc pas très gênant.

Malheureusement, je n’arrive pas à reproduire ce qui fait planter (sinon ce serait trop facile) et mon utilisation quotidienne ne change pas (pas d’utilisation particulière de Gladys ou des modules, pas de modifications effectuées au cours des derniers mois, pas de modification de mon installation, et les scenarii se lance quotidiennement sans jamais de problème (sauf quand le problème énoncé survient…)

Aujourd’hui j’ai un tout petit peu de temps, j’ai donc fait un pm2 log Gladys --lines 100 et voici ce que j’obtiens :

0|gladys   | Access with token to user Retlaw
0|gladys   | Access with token to user Retlaw
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Sending 500 ("Server Error") response:
0|gladys   |  Error (E_UNKNOWN) :: Encountered an unexpected error
0|gladys   | : ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   |     at Query.Sequence._packetToError (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
0|gladys   |     at Query.ErrorPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |     --------------------
0|gladys   |     at Protocol._enqueue (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:141:48)
0|gladys   |     at PoolConnection.query (/home/pi/gladys/node_modules/mysql/lib/Connection.js:201:25)
0|gladys   |     at __CREATE__ (/home/pi/gladys/node_modules/sails-mysql/lib/adapter.js:410:20)
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Ping.onOperationComplete [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:99:5)
0|gladys   |     at Ping.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Ping.Sequence.OkPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   | Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Server Error:
0|gladys   | Error (E_UNKNOWN) :: Encountered an unexpected error
0|gladys   | : ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   |     at Query.Sequence._packetToError (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
0|gladys   |     at Query.ErrorPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |     --------------------
0|gladys   |     at Protocol._enqueue (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:141:48)
0|gladys   |     at PoolConnection.query (/home/pi/gladys/node_modules/mysql/lib/Connection.js:201:25)
0|gladys   |     at __CREATE__ (/home/pi/gladys/node_modules/sails-mysql/lib/adapter.js:410:20)
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Ping.onOperationComplete [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:99:5)
0|gladys   |     at Ping.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Ping.Sequence.OkPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   | Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full

Je ferai un reboot un peu plus tard dans l’après midi afin de garder mon installation buguée encore un peu au cas où un de nos pro passe par là et me demande des infos supplémentaires :slight_smile:


#2

Ça m’a tout l’air d’être une table event bien pleine.
Tu peux voir combien elle contient d’enregistrement ?
Tu peux la purger à intervalle régulier par un script du genre :

gladys.event.purge({day:60})
.then(function(result) {
    console.error('number of event lines deleted : ' + result.affectedRows);
})
.catch(function(err) {
    console.log(err)
});

ca te purges tout ce qui est plus vieux de 60 jours.


#3

Je vais regarder, mais impossible de retrouver comment faire… (Il faut accéder via mysql si je ne me trompe pas ? )


#4

Tu peux aussi le faire par script depuis gladys :

gladys.utils.sql("SELECT COUNT(id) FROM event;")
.then((response) => {
    console.log(response);
})
.catch((err) => console.log(err));

#5

Alors, en réponse au script dans les logs, j’ai ceci :

0|gladys | [ RowDataPacket { 'COUNT(id)': 3197300 } ]

= 3 000 000 d’events ?


#6

ben oui :slight_smile: tu peux en purger un peu je pense :wink:


#7

Bon, j’ai lancé le script de purge, voici les logs en retour :

0|gladys   | { Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
0|gladys   |     at Query.Sequence._packetToError (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
0|gladys   |     at Query.ErrorPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |     --------------------
0|gladys   |     at Protocol._enqueue (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:141:48)
0|gladys   |     at PoolConnection.query (/home/pi/gladys/node_modules/mysql/lib/Connection.js:201:25)
0|gladys   |     at __QUERY__ (/home/pi/gladys/node_modules/sails-mysql/lib/adapter.js:107:22)
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Ping.onOperationComplete [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:99:5)
0|gladys   |     at Ping.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Ping.Sequence.OkPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |   cause:
0|gladys   |    { Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
0|gladys   |     at Query.Sequence._packetToError (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
0|gladys   |     at Query.ErrorPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |     --------------------
0|gladys   |     at Protocol._enqueue (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:141:48)
0|gladys   |     at PoolConnection.query (/home/pi/gladys/node_modules/mysql/lib/Connection.js:201:25)
0|gladys   |     at __QUERY__ (/home/pi/gladys/node_modules/sails-mysql/lib/adapter.js:107:22)
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Ping.onOperationComplete [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:99:5)
0|gladys   |     at Ping.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Ping.Sequence.OkPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |      code: 'ER_LOCK_WAIT_TIMEOUT',
0|gladys   |      errno: 1205,
0|gladys   |      sqlState: 'HY000',
0|gladys   |      index: 0,
0|gladys   |      originalError: [Circular] },
0|gladys   |   isOperational: true,
0|gladys   |   code: 'ER_LOCK_WAIT_TIMEOUT',
0|gladys   |   errno: 1205,
0|gladys   |   sqlState: 'HY000',
0|gladys   |   index: 0,
0|gladys   |   originalError:
0|gladys   |    { Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
0|gladys   |     at Query.Sequence._packetToError (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
0|gladys   |     at Query.ErrorPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |     --------------------
0|gladys   |     at Protocol._enqueue (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:141:48)
0|gladys   |     at PoolConnection.query (/home/pi/gladys/node_modules/mysql/lib/Connection.js:201:25)
0|gladys   |     at __QUERY__ (/home/pi/gladys/node_modules/sails-mysql/lib/adapter.js:107:22)
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:84:5)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Ping.onOperationComplete [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:99:5)
0|gladys   |     at Ping.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Ping.Sequence.OkPacket (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
0|gladys   |     at Protocol._parsePacket (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:280:23)
0|gladys   |     at Parser.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Parser.js:73:12)
0|gladys   |     at Protocol.write (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:39:16)
0|gladys   |     at Socket.<anonymous> (/home/pi/gladys/node_modules/mysql/lib/Connection.js:96:28)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at addChunk (_stream_readable.js:263:12)
0|gladys   |     at readableAddChunk (_stream_readable.js:250:11)
0|gladys   |     at Socket.Readable.push (_stream_readable.js:208:10)
0|gladys   |     at TCP.onread (net.js:594:20)
0|gladys   |      code: 'ER_LOCK_WAIT_TIMEOUT',
0|gladys   |      errno: 1205,
0|gladys   |      sqlState: 'HY000',
0|gladys   |      index: 0,
0|gladys   |      originalError: [Circular] } }
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Event : create : new Event with code : devicetype-new-value
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full
0|gladys   | Zwave module: Fail to save deviceState : [Error (E_UNKNOWN) Encountered an unexpected error] Details:  Error: ER_RECORD_FILE_FULL: The table 'event' is full

Pas sûr que cela ait fonctionné… Je vais faire un reboot et relancer le script, à moins que tu ne veuilles que je fasse quelque chose avant ?


#8

Je pense que c’est trop long, simplement. tu vas devoir le faire en plusieurs fois … :frowning:


#9

Donc dans le script, dans la ligne gladys.event.purge({day:60}) je remplace 60 par 300 (par ex), puis 200, puis 100, etc etc ?

C’est ça ?


#10

oui, c’est ça. Si ça marche pas, on passera en plus “hard”.


#11

Je viens de lancer 600 à la place de 60 il y a 3 minutes, un message d’erreur identique au précédent vient d’apparaitre à l’instant dans les logs… :roll_eyes:

Edit : Avant de passer en mode hard, veux tu que je reboot et je relance le script ?


#12

Et tu as toujours tes 3.2 millions d’event ?


#13

Oui…

Je reboot et reteste avant de passer en mode hard ? (l’edit de mon précédent message a croisé ton message)


#14

oui, c’est plus sûr :slight_smile:


#15

Alors, Gladys opérationnelle après reboot (logique car constaté à chaque fois)

J’ai relancé le script pour connaitre le nombre d’event, le nombre a augmenté de 50.
J’ai lancé le script de purge, j’attends le retour des logs.

En attendant, j’ai une question qui pourrait être liée à mon problème : je constate depuis longtemps que toutes le 5 minutes, dans les logs, une longue liste d’event apparait lié au z-wave, est-ce normal ?

Edit : Le script de purge renvoi les mêmes logs d’erreur… Même avec 600 au lieu de 60… :unamused:


#16

Je passe à l’apéro ! À plus tard …


#17

Je vais faire exactement la même chose !

On revois ça plus tard car impossible de purger la table d’event :wink:


#18

La méthode “hard” :
En console :
mysql -uroot -proot
puis
use gladys
puis
DELETE FROM event WHERE datetime < NOW() - INTERVAL 60 DAY;
pour “plus vieux que 60 jours”. Attention de ne pas oublier le “;” à la fin !


#19

Merci pour la manip !

Mais raté, ça ne marche pas… Après 2 minutes d’attente, j’ai ce message qui s’affiche : ERROR 1114 (HY000): The table 'event' is full

Et le nombre d’event ne cesse de grimper ! [ RowDataPacket { 'COUNT(id)': 3197897 } ]


#20

Peux-t-on tenter de faire de l’archivage automatique avec MySQL ? (un système de partition ?)
Ce serait peut-être intéressant d’alléger automatiquement Gladys pour des données qui ont un certain âge, sans pour autant les supprimer réellement, mais simplement les mettre “de côté” car trop vieille ?