[JeeMySensors] Erreur analyse du message : can't start new thread

Bonjour,

Je débute avec le plugin JeeMySensors sur un Raspberry Pi avec une Serial Gateway en USB.
En cherchant à analyser certains comportement du réseau MySensors, j’ai remarqué l’apparition de nombreuses erreurs « Erreur analyse du message : can’t start new thread » dans le log JeeMySensors.

Par exemple :

[2021-01-24 19:18:17][ERROR] : [  12 ] Erreur analyse du message : can't start new thread
[2021-01-24 20:18:17][INFO] : [moniteur] SERIAL - 12 --> 0;255;3;0;9;2293906 TSF:MSG:READ,2-2-0,s=19,c=1,t=39,pt=3,l=2,sg=0:0
[2021-01-24 19:18:18][ERROR] : [  12 ] Erreur analyse du message : can't start new thread
[2021-01-24 20:18:18][INFO] : [moniteur] SERIAL - 12 --> 0;255;3;0;9;2301050 TSF:MSG:READ,2-2-0,s=1,c=1,t=25,pt=0,l=0,sg=0:
[2021-01-24 19:18:18][ERROR] : [  12 ] Erreur analyse du message : can't start new thread
[2021-01-24 19:18:19][ERROR] : [  12 ] Erreur analyse du message : can't start new thread
[2021-01-24 19:18:19][ERROR] : [  12 ] Erreur analyse du message : can't start new thread

Je pense que le plugin crée trop de threads python sur le système car il plafonne à environ 370 threads quand le deamon est actif. La séquence suivante montre qu’aucun thread n’est actif avant démarrage et monte très rapidement :

xxx@raspberrypi:~ $ pstree | grep python
xxx@raspberrypi:~ $ pstree | grep python
        |-python
xxx@raspberrypi:~ $ pstree | grep python
        |-python
xxx@raspberrypi:~ $ pstree | grep python
        |-python
xxx@raspberrypi:~ $ pstree | grep python
        |-python
xxx@raspberrypi:~ $ pstree | grep python
        |-python---3*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---6*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---16*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---22*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---20*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---20*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---20*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---18*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---39*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---37*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---35*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---40*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---39*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---38*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---41*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---104*[{python}]
xxx@raspberrypi:~ $ pstree | grep python
        |-python---372*[{python}]

Est-ce que je peux fixer cela ? Je suppose que je perds des messages du réseau MySensors lors des
erreurs.

Bonsoir,
Ah il faut que je regarde cela … tu as beaucoup de noeud connecté à ta gateway en usb ?

Un seul pour l’instant… je débute :slight_smile:

J’ai fait un test avec un nouveau node (un sensor température + humidité basé sur un Si7021) et les threads sont restés stables (4) à chaque fois que j’ai vérifié.
Comme j’ai fait pas mal chargements de sketchs sur les arduinos durant mes tests, il faut que je réactive le premier pour confirmer que l’explosion du nombre de threads python vient bien spécifiquement de ce node.

bonsoir,
ok je reste à l’écoute si le problème se reproduit.
cdt,