Hébergements Web - SQL Privée : RAM utilisé et connexion constante
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

SQL Privée : RAM utilisé et connexion constante

Von
StanK
Erstellungsdatum 2023-04-24 08:09:55 (edited on 2024-09-04 14:09:38) in Hébergements Web

Bonjour,

J'ai trop de RAM utilisé, et toujours un utilisateur connecté, je ne comprends pas pourquoi.
Vu mon utilisation je devrais avoir besoin que de 512Mo de RAM, mais j'ai des overflows.

Je viens de prendre une base de donnée SQL privée sur OVH (avant j'étais sur du mutualisé).
Je ne comprends pas très bien les "métriques" donnés par OVH, et il semblerait qu'on n'a pas accès à d'autres métriques.

Voici ce qui est affiché :
image

Ma config:
MySQL 8.0
`tmpdir`: /dev/shm
`innoddb_bufferr_pool_size`: 512M (je met plus ou moins la moitié de ma RAM sur ça)
`max_allowed_packet`: 8M

J'ai une base de donnée de 1.5Go et je dois avoir pour 150Mo d'index.
J'ai quelques slow query mais vraiment très peu, et qui ne correspondent pas aux piques de RAM.
J'ai coupé tous mes crons pour valider que ce ne sont pas eux qui posent problème.

**Statistiques de la mémoire utilisée** : je ne comprends pas pourquoi je dépasse mes 1024Mo de RAM.
Que j'atteigne mes 1024 pourquoi pas, tant qu'il y a du cache mysql doit l'utiliser. Mais aller au dessus ?
Avant j'étais en 512Mo et j'avais des alertes Overflow. Là j'imagine que je vais en re-avoir.
Comment investiguer plus en détail ce qu'il se passe, sachant que pas mal de table system sont bloqués, genre:
`mysql> SHOW ENGINE INNODB STATUS;`
`ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation`

**Statistiques du total des connexions par minute** : pourquoi est-ce qu'il y a toujours un utilisateur connecté, sachant que je ne maintiens pas de connexion ouverte ?
Quand je me connecte sur mon mysql (donc j'ai 2 utilisateurs connecté affiché sur OVH), quand je fais `SHOW FULL PROCESSLIST;` j'en ai qu'un seul.

Merci si vous pouvez m'éclairez,

Stan


2 Antworten ( Latest reply on 2023-05-05 07:19:35 Von
StanK
)

Hello @StanK,

Vous avez la possibilité de consulter vos logs depuis le manager : https://help.ovhcloud.com/csm/fr-web-cloud-db-getting-started?id=kb_article_view&sysparm_article=KB0051496#recuperer-les-logs-de-votre-serveur-web-cloud-databases

Si le dysfonctionnement persiste après analyse, je vous inviterais dans ce cas à ouvrir une demande d'assistance afin que l'équipe concernée puisse investiguer.

^FabL

Merci, cependant il n'y a quasiment rien dans ces logs.

Sur le 5 derniers jours ça donne:
``2023-04-30T07:15:58.000Z 2023-04-30T07:15:58.627481Z 210800 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.
2023-05-01T07:12:07.000Z 2023-05-01T07:12:07.807237Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.0.32).
2023-05-01T07:12:07.000Z 2023-05-01 09:12:07 1614649300 limit reached (1615372288). Killing PID 1 using SIGTERM...
2023-05-01T07:12:07.000Z 2023-05-01 09:12:07,769 WARN received SIGTERM indicating exit request
2023-05-01T07:12:07.000Z 2023-05-01 09:12:07,777 INFO waiting for mysql, soft-oom-killer, sshd to die
2023-05-01T07:12:07.000Z 2023-05-01 09:12:07,799 INFO stopped: sshd (exit status 0)
2023-05-01T07:12:07.000Z 2023-05-01 09:12:07,806 INFO stopped: soft-oom-killer (terminated by SIGTERM)
2023-05-01T07:12:09.000Z 2023-05-01T07:12:09.583383Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32) MySQL Community Server - GPL.
2023-05-01T07:12:09.000Z 2023-05-01 09:12:09,699 INFO stopped: mysql (exit status 0)
2023-05-01T07:12:12.000Z Getting CA Private Key
2023-05-01T07:12:12.000Z subject=C = FR, ST = Nord, O = OVH, CN = ks17531-001
2023-05-01T07:12:12.000Z Detected a 1 GB container
2023-05-01T07:12:12.000Z MySQL TLS CA already exists
2023-05-01T07:12:12.000Z Generate server certificate
2023-05-01T07:12:12.000Z Generating RSA private key, 2048 bit long modulus (2 primes)
2023-05-01T07:12:12.000Z ..........+++++
2023-05-01T07:12:12.000Z .............................+++++
2023-05-01T07:12:12.000Z e is 65537 (0x010001)
2023-05-01T07:12:12.000Z Ignoring -days; not generating a certificate
2023-05-01T07:12:12.000Z Signature ok
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,533 INFO Included extra file "/etc/supervisor/conf.d/mysql.conf" during parsing
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,534 INFO Included extra file "/etc/supervisor/conf.d/soft-oom-killer.conf" during parsing
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,534 INFO Included extra file "/etc/supervisor/conf.d/sshd.conf" during parsing
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,534 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,534 INFO Set uid to user 0 succeeded
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,536 INFO RPC interface 'supervisor' initialized
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,536 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-05-01T07:12:12.000Z 2023-05-01 09:12:12,537 INFO supervisord started with pid 1
2023-05-01T07:12:13.000Z 2023-05-01 09:12:13,539 INFO spawned: 'mysql' with pid 55
2023-05-01T07:12:13.000Z 2023-05-01 09:12:13,540 INFO spawned: 'soft-oom-killer' with pid 56
2023-05-01T07:12:13.000Z 2023-05-01 09:12:13,542 INFO spawned: 'sshd' with pid 57
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.566435Z 0 [Warning] [MY-000082] [Server] option 'performance_schema_max_statement_classes': value -1 adjusted to 0.
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.711553Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.711575Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 55
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.716346Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=201326592. Please use innodb_redo_log_capacity instead.
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.717897Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-05-01T07:12:13.000Z 2023-05-01T07:12:13.913836Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-05-01T07:12:14.000Z 2023-05-01T07:12:14.374394Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-05-01T07:12:14.000Z 2023-05-01T07:12:14.374427Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-05-01T07:12:14.000Z 2023-05-01T07:12:14.417305Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-05-01T07:12:14.000Z 2023-05-01T07:12:14.417419Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2023-05-01T07:12:15.000Z 2023-05-01 09:12:15,418 INFO success: soft-oom-killer entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-05-01T07:12:15.000Z 2023-05-01 09:12:15,419 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-05-01T07:12:44.000Z 2023-05-01 09:12:44,455 INFO success: mysql entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-05-01T07:20:24.000Z 2023-05-01T07:20:24.162681Z 687 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.
2023-05-02T07:15:53.000Z 2023-05-02T07:15:53.739480Z 107884 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.
2023-05-03T07:18:50.000Z 2023-05-03T07:18:50.706479Z 203438 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.
2023-05-04T07:17:37.000Z 2023-05-04T07:17:37.272344Z 296794 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.
``