Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Perfomance / Delay im Javascript Adapter

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Perfomance / Delay im Javascript Adapter

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @pepp86 last edited by

      @pepp86 sagte: wie ich noch weiter herausfinden kann, wo es "hängen" bleibt.

      Mit folgender Ergänzung kann man durch Vergleich des Log-Zeitpunktes mit der Log-Ausgabe der Zeitstempel sehen, an welcher Stelle die Verzögerung verursacht wird.

      const cacheSelectorBWM  = $('state[state.id=*.occupancy](functions=bwm_innen)(rooms=Flur OG)');
       
      cacheSelectorBWM.on(function (dp) { 
          log('Triggerzeitstempel: ' + formatDate(dp.state.ts, 'hh:mm:ss.sss'));
          let motion = false;
          cacheSelectorBWM.each(function(id) {
              log(id);
              if(getState(id).val) motion = true;
          });
          setState("0_userdata.0.rooms.Flur_OG.motion", motion, true);
      });
      
      on({id: "0_userdata.0.rooms.Flur_OG.motion"}, function(dp) {
          log('Zielzeitstempel: ' + formatDate(dp.state.ts, 'hh:mm:ss.sss'));
      });
      
      1 Reply Last reply Reply Quote 0
      • P
        pepp86 last edited by

        Hi,

        sorry - das hatte ich gar nicht dazu geschrieben. Über Logs habe ich genau das festgestellt, die Funktion startet schon verzögert auf den DP. Also Quell-DP und Ziel-DP haben am Ende auch den timestamp verschoben. Daher wirklich die Frage, wo man ansetzen kann zum Debuggen. (JS Adapter, Controller, Redis)

        Homoran paul53 2 Replies Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @pepp86 last edited by

          @pepp86 sagte in Perfomance / Delay im Javascript Adapter:

          die Funktion startet schon verzögert auf den DP.

          heisst was genau?

          Tastendruck --> 3 sec --> Änderung des DP in Objekten --> 2 sec --> Trigger löst aus --> 5 sec --> Licht geht an

          oder wie?

          P 1 Reply Last reply Reply Quote 0
          • P
            pepp86 @Homoran last edited by

            @homoran

            Jain. Es ist eher so:

            Tastendruck/BWM Auslösung -> Sofortige Änderung des DP in Objekten -> x Sec -> Trigger löst aus -> x Sec -> Licht geht an.

            Egal über welchen Service (HM, zigbee etc.). Der ursprüngliche DP wird sofort gesetzt, es hakt irgendwo zum/im JS Adapter.

            Homoran 1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @pepp86 last edited by

              @pepp86 dann zeig mal höchstvorsorglich iob diag in der Langfassung

              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @pepp86 last edited by paul53

                @pepp86 sagte: die Funktion startet schon verzögert auf den DP.

                Also besteht eine große Differenz zwischen Zeitstempel des Trigger-DP und Trigger-Zeitpunkt? Das deutet auf eine zu lange Warteschlange für Trigger-Ereignisse hin. Irgend etwas (ein Skript?) feuert wohl zu viele Ereignisse (setState) ab. Das kann an einer Schleife liegen oder an vielen parallel laufenden Timern, die nicht gestoppt wurden.

                EDIT: Reagieren die Trigger unmittelbar nach Neustart der Javascript-Instanz nach einer Pause schneller?

                1 Reply Last reply Reply Quote 0
                • P
                  pepp86 last edited by

                  @Homoran iob diag muss ich später mal laufen lassen.

                  @paul53 Ja, das könnte hinkommen. Die Installation ist mittlerweile sehr groß. Möchte nicht ausschließen, dass irgendwas wild läuft. Ne Idee wie man so einen Übeltäter am schnellsten findet?

                  Homoran paul53 2 Replies Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @pepp86 last edited by

                    @pepp86 sagte in Perfomance / Delay im Javascript Adapter:

                    Ne Idee wie man so einen Übeltäter am schnellsten findet?

                    @pepp86 sagte in Perfomance / Delay im Javascript Adapter:

                    @Homoran iob diag

                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @pepp86 last edited by paul53

                      @pepp86 sagte: Idee wie man so einen Übeltäter am schnellsten findet?

                      Wenn ein Skript die Ursache ist, sollte das folgende Testskript die 4 am häufigsten sendenden Skripte im Log alle 15 s zeigen:

                      const ids = $('javascript.0.scriptEnabled.*');
                      const scripts = [];
                      const objects = [];
                      
                      ids.each(function(id) {
                          const script = id.replace('javascript.0.scriptEnabled.', 'script.js.');
                          scripts.push(script);
                          const obj = {script: script.replace('script.js.', ''), cnt: 0};
                          objects.push(obj);
                      });
                      
                      on({id: /.*/, from: 'system.adapter.javascript.0'}, function(dp) {
                          const script = dp.state.c;
                          if(script) {
                              const idx = scripts.indexOf(script);
                              if(idx >= 0) objects[idx].cnt++;
                          }
                      }); 
                      
                      schedule('*/15 * * * * *', function() {
                          setTimeout(function() {
                              const sorted = [];
                              for(let i = 0; i < objects.length; i++) {
                                  sorted[i] = objects[i];
                              }
                              sorted.sort(function(a,b) { 
                                  return b.cnt - a.cnt;
                              });
                              sorted.length = 4;
                              log(sorted);
                          }, 100);
                      });
                      
                      liv-in-sky 1 Reply Last reply Reply Quote 2
                      • P
                        pepp86 last edited by

                        Hab jetzt mal ein bisschen geguckt und beobachtet. Es gibt keine Scripte, die große Mengen an setState pro 15 Sekunden haben.
                        Es scheint jedoch wirklich so zu sein, dass nach einem Neustart das Phänomen verschwindet und dann langsam wieder auftaucht. Zum testen habe ich gestern einen komplett frischen Host aufgesetzt und die Instanz dorthin verschoben, keine Änderung.

                        Nachstehend mal iob diag von dem betroffenen Host:

                        Skript v.2024-05-22
                        
                        *** BASE SYSTEM ***
                         Static hostname: iosrv2
                               Icon name: computer-container
                                 Chassis: container ☐
                          Virtualization: lxc
                        Operating System: Ubuntu 23.04
                                  Kernel: Linux 5.15.85-1-pve
                            Architecture: x86-64
                        Firmware Version: CB9_FV102
                        
                        model name      : Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
                        Docker          : false
                        Virtualization  : lxc
                        Kernel          : x86_64
                        Userland        : 64 bit
                        
                        Systemuptime and Load:
                         17:04:55 up 1 day,  4:47,  2 users,  load average: 1.57, 1.23, 1.02
                        CPU threads: 6
                        
                        
                        *** Time and Time Zones ***
                                       Local time: Tue 2024-07-09 17:04:55 CEST
                                   Universal time: Tue 2024-07-09 15:04:55 UTC
                                         RTC time: n/a
                                        Time zone: Europe/Berlin (CEST, +0200)
                        System clock synchronized: yes
                                      NTP service: inactive
                                  RTC in local TZ: no
                        
                        *** Users and Groups ***
                        User that called 'iob diag':
                        root
                        HOME=/root
                        GROUPS=root
                        
                        User that is running 'js-controller':
                        iobroker
                        HOME=/home/iobroker
                        GROUPS=iobroker tty dialout audio video plugdev
                        
                        *** Display-Server-Setup ***
                        Display-Server: false
                        Desktop: 
                        Terminal: 
                        Boot Target:    graphical.target
                        
                        *** MEMORY ***
                                       total        used        free      shared  buff/cache   available
                        Mem:            2.1G        996M        282M        122K        868M        1.2G
                        Swap:           4.3G        8.2K        4.3G
                        Total:          6.4G        996M        4.6G
                        
                        Active iob-Instances:   43
                        
                                 2048 M total memory
                                  950 M used memory
                                  535 M active memory
                                 1095 M inactive memory
                                  269 M free memory
                                    0 M buffer memory
                                  827 M swap cache
                                 4096 M total swap
                                    0 M used swap
                                 4095 M free swap
                        
                        *** top - Table Of Processes  ***
                        top - 17:04:55 up 1 day,  4:47,  2 users,  load average: 1.57, 1.23, 1.02
                        Tasks:  35 total,   1 running,  34 sleeping,   0 stopped,   0 zombie
                        %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
                        MiB Mem :   2048.0 total,    267.7 free,    952.3 used,    828.0 buff/cache     
                        MiB Swap:   4096.0 total,   4096.0 free,      0.0 used.   1095.7 avail Mem 
                        
                        *** FAILED SERVICES ***
                        
                          UNIT                 LOAD   ACTIVE SUB    DESCRIPTION
                        * run-rpc_pipefs.mount loaded failed failed RPC Pipe File System
                        
                        LOAD   = Reflects whether the unit definition was properly loaded.
                        ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
                        SUB    = The low-level unit activation state, values depend on unit type.
                        1 loaded units listed.
                        
                        *** FILESYSTEM ***
                        Filesystem                       Type   Size  Used Avail Use% Mounted on
                        /dev/mapper/pve-vm--118--disk--0 ext4    15G  3.4G   11G  24% /
                        none                             tmpfs  492K  4.0K  488K   1% /dev
                        tmpfs                            tmpfs  7.8G     0  7.8G   0% /dev/shm
                        tmpfs                            tmpfs  3.1G  120K  3.1G   1% /run
                        tmpfs                            tmpfs  5.0M     0  5.0M   0% /run/lock
                        
                        Messages concerning ext4 filesystem in dmesg:
                        dmesg: read kernel buffer failed: Operation not permitted
                        
                        Show mounted filesystems:
                        TARGET                                                  SOURCE                           FSTYPE      OPTIONS
                        /                                                       /dev/mapper/pve-vm--118--disk--0 ext4        rw,relatime,stripe=16
                        |-/run                                                  tmpfs                            tmpfs       rw,nosuid,nodev,size=3244760k,nr_inodes=819200,mode=755,uid=100000,gid=100000,inode64
                        | |-/run/lock                                           tmpfs                            tmpfs       rw,nosuid,nodev,noexec,relatime,size=5120k,uid=100000,gid=100000,inode64
                        | |-/run/credentials/systemd-sysctl.service             none                             ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
                        | |-/run/credentials/systemd-tmpfiles-setup.service     none                             ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
                        | |-/run/credentials/systemd-sysusers.service           none                             ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
                        | `-/run/credentials/systemd-tmpfiles-setup-dev.service none                             ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
                        |-/dev                                                  none                             tmpfs       rw,relatime,size=492k,mode=755,uid=100000,gid=100000,inode64
                        | |-/dev/shm                                            tmpfs                            tmpfs       rw,nosuid,nodev,uid=100000,gid=100000,inode64
                        | |-/dev/mqueue                                         mqueue                           mqueue      rw,relatime
                        | |-/dev/.lxc/proc                                      proc                             proc        rw,relatime
                        | |-/dev/.lxc/sys                                       sys                              sysfs       rw,relatime
                        | |-/dev/full                                           udev[/full]                      devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/null                                           udev[/null]                      devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/random                                         udev[/random]                    devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/tty                                            udev[/tty]                       devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/urandom                                        udev[/urandom]                   devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/zero                                           udev[/zero]                      devtmpfs    rw,nosuid,relatime,size=8078200k,nr_inodes=2019550,mode=755,inode64
                        | |-/dev/pts                                            devpts                           devpts      rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666,max=1026
                        | |-/dev/ptmx                                           devpts[/ptmx]                    devpts      rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666,max=1026
                        | |-/dev/console                                        devpts[/0]                       devpts      rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666,max=1026
                        | |-/dev/tty1                                           devpts[/1]                       devpts      rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666,max=1026
                        | `-/dev/tty2                                           devpts[/2]                       devpts      rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666,max=1026
                        |-/proc                                                 proc                             proc        rw,nosuid,nodev,noexec,relatime
                        | |-/proc/sys                                           proc[/sys]                       proc        ro,relatime
                        | | |-/proc/sys/net                                     proc[/sys/net]                   proc        rw,nosuid,nodev,noexec,relatime
                        | | |-/proc/sys/kernel/random/boot_id                   none[/.lxc-boot-id]              tmpfs       ro,nosuid,nodev,noexec,relatime,size=492k,mode=755,uid=100000,gid=100000,inode64
                        | | `-/proc/sys/fs/binfmt_misc                          binfmt_misc                      binfmt_misc rw,nosuid,nodev,noexec,relatime
                        | |-/proc/sysrq-trigger                                 proc[/sysrq-trigger]             proc        ro,relatime
                        | |-/proc/cpuinfo                                       lxcfs[/proc/cpuinfo]             fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/diskstats                                     lxcfs[/proc/diskstats]           fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/loadavg                                       lxcfs[/proc/loadavg]             fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/meminfo                                       lxcfs[/proc/meminfo]             fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/slabinfo                                      lxcfs[/proc/slabinfo]            fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/stat                                          lxcfs[/proc/stat]                fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | |-/proc/swaps                                         lxcfs[/proc/swaps]               fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        | `-/proc/uptime                                        lxcfs[/proc/uptime]              fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        `-/sys                                                  sysfs                            sysfs       ro,nosuid,nodev,noexec,relatime
                          |-/sys/fs/fuse/connections                            fusectl                          fusectl     rw,nosuid,nodev,noexec,relatime
                          |-/sys/devices/virtual/net                            sysfs[/devices/virtual/net]      sysfs       rw,nosuid,nodev,noexec,relatime
                          |-/sys/kernel/debug                                   debugfs                          debugfs     rw,nosuid,nodev,noexec,relatime
                          |-/sys/kernel/security                                securityfs                       securityfs  rw,nosuid,nodev,noexec,relatime
                          |-/sys/fs/pstore                                      pstore                           pstore      rw,nosuid,nodev,noexec,relatime
                          |-/sys/firmware/efi/efivars                           efivarfs                         efivarfs    rw,nosuid,nodev,noexec,relatime
                          |-/sys/fs/cgroup                                      none                             cgroup2     rw,nosuid,nodev,noexec,relatime
                          `-/sys/devices/system/cpu                             lxcfs[/sys/devices/system/cpu]   fuse.lxcfs  rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
                        
                        Files in neuralgic directories:
                        
                        /var:
                        596M    /var/
                        249M    /var/cache
                        243M    /var/cache/apt
                        234M    /var/lib
                        155M    /var/cache/apt/archives
                        
                        Archived and active journals take up 108.9M in the file system.
                        
                        /opt/iobroker/backups:
                        15M     /opt/iobroker/backups/
                        
                        /opt/iobroker/iobroker-data:
                        68M     /opt/iobroker/iobroker-data/
                        36M     /opt/iobroker/iobroker-data/backup-objects
                        15M     /opt/iobroker/iobroker-data/files
                        13M     /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js
                        13M     /opt/iobroker/iobroker-data/files/admin.admin/custom/static
                        
                        The five largest files in iobroker-data are:
                        9.1M    /opt/iobroker/iobroker-data/objects.jsonl
                        6.3M    /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-node_modules_iobroker_adapter-react-v5_assets_devices_parseNames_js-node_modules_iobr-99c23e.847b8ad9.chunk.js.map
                        2.8M    /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-node_modules_iobroker_adapter-react-v5_assets_devices_parseNames_js-node_modules_iobr-99c23e.847b8ad9.chunk.js
                        1.6M    /opt/iobroker/iobroker-data/states.jsonl
                        1.6M    /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-node_modules_mui_material_Accordion_index_js-node_modules_mui_material_AccordionDetai-57e02d.0886b730.chunk.js.map
                        
                        USB-Devices by-id:
                        USB-Sticks -  Avoid direct links to /dev/tty* in your adapter setups, please always prefer the links 'by-id':
                        
                        No Devices found 'by-id'
                        
                        
                        
                        
                        *** NodeJS-Installation ***
                        
                        /usr/bin/nodejs         v20.15.0
                        /usr/bin/node           v20.15.0
                        /usr/bin/npm            10.8.1
                        /usr/bin/npx            10.8.1
                        /usr/bin/corepack       0.28.1
                        
                        
                        nodejs:
                          Installed: 20.15.0-1nodesource1
                          Candidate: 20.15.1-1nodesource1
                          Version table:
                             20.15.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                         *** 20.15.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                                100 /var/lib/dpkg/status
                             20.14.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.13.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.13.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.12.2-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.12.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.12.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.11.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.11.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.10.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.9.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.8.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.8.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.7.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.6.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.6.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.5.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.5.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.4.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.3.1-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.3.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.2.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.1.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             20.0.0-1nodesource1 1001
                                500 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages
                             18.13.0+dfsg1-1ubuntu2 500
                                500 http://archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
                        
                        Temp directories causing npm8 problem: 0
                        No problems detected
                        
                        Errors in npm tree:
                        
                        *** ioBroker-Installation ***
                        
                        ioBroker Status
                        iobroker is running on this host.
                        
                        At least one iobroker host is running.
                        
                        Objects type: redis
                        States  type: redis
                        
                        Core adapters versions
                        js-controller:  6.0.6
                        admin:          7.0.11
                        javascript:     8.6.0
                        
                        nodejs modules from github:     1
                        `-- iobroker.zigbee2mqtt@2.13.9 (git+ssh://git@github.com/arteck/ioBroker.zigbee2mqtt.git#bbb7480f74e0fb4de22dfbf4b5b2e9b6839151ef)
                        
                        Adapter State
                        + system.adapter.admin.0                  : admin                 : iosrv                                    -  enabled, port: 8081, bind: 0.0.0.0 (SSL), run as: admin
                          system.adapter.admin.1                  : admin                 : iosrv                                    - disabled, port: 9081, bind: 0.0.0.0 (SSL), run as: admin
                          system.adapter.admin.2                  : admin                 : iosrv3                                   - disabled, port: 8081, bind: 0.0.0.0, run as: admin
                          system.adapter.admin.3                  : admin                 : apsrv6                           - disabled, port: 8081, bind: 10.19.81.162, run as: admin
                        + system.adapter.alexa2.0                 : alexa2                : iosrv3                                   -  enabled
                          system.adapter.alias-manager.0          : alias-manager         : iosrv                                    - disabled
                          system.adapter.awattar.0                : awattar               : ioslave5                                 -  enabled
                          system.adapter.backitup.0               : backitup              : iosrv                                    - disabled
                        + system.adapter.backitup.1               : backitup              : ioslave2                                 -  enabled
                          system.adapter.backitup.2               : backitup              : iosrv3                                   - disabled
                        + system.adapter.device-watcher.0         : device-watcher        : iosrv                                    -  enabled
                          system.adapter.discovery.0              : discovery             : iosrv                                    - disabled
                          system.adapter.email.0                  : email                 : iosrv                                    - disabled
                        + system.adapter.eusec.0                  : eusec                 : iosrv3                                   -  enabled
                          system.adapter.flot.0                   : flot                  : iosrv                                    - disabled
                          system.adapter.go-e.0                   : go-e                  : iosrv                                    - disabled
                        + system.adapter.hm-rega.0                : hm-rega               : iosrv3                                   -  enabled
                        + system.adapter.hm-rpc.0                 : hm-rpc                : iosrv3                                   -  enabled, port: 0
                        + system.adapter.hm-rpc.1                 : hm-rpc                : iosrv3                                   -  enabled, port: 0
                        + system.adapter.influxdb.0               : influxdb              : iosrv                                    -  enabled, port: 8086
                          system.adapter.info.0                   : info                  : iosrv                                    -  enabled
                        + system.adapter.iot.0                    : iot                   : iosrv3                                   -  enabled
                        + system.adapter.javascript.0             : javascript            : iosrv                                    -  enabled
                        + system.adapter.javascript.1             : javascript            : ioslave5                                 -  enabled
                        + system.adapter.javascript.11            : javascript            : iosrv                                    -  enabled
                        + system.adapter.javascript.12            : javascript            : iosrv                                    -  enabled
                        + system.adapter.javascript.13            : javascript            : ioslave5                                 -  enabled
                        + system.adapter.javascript.21            : javascript            : ioslave2                                 -  enabled
                        + system.adapter.javascript.31            : javascript            : iosrv2                                   -  enabled
                        + system.adapter.javascript.41            : javascript            : iosrv3                                   -  enabled
                          system.adapter.js2fs.0                  : js2fs                 : iosrv                                    - disabled
                        + system.adapter.mqtt.1                   : mqtt                  : iosrv2                                   -  enabled, port: 1883, bind: 0.0.0.0
                          system.adapter.netatmo-crawler.0        : netatmo-crawler       : apsrv6                           -  enabled
                        + system.adapter.node-red.0               : node-red              : iosrv                                    -  enabled, port: 1880, bind: :: (SSL)
                          system.adapter.node-red.1               : node-red              : ioslave3                                 - disabled, port: 1880, bind: 0.0.0.0 (SSL)
                        + system.adapter.node-red.2               : node-red              : iosrv2                                   -  enabled, port: 1880, bind: 0.0.0.0 (SSL)
                          system.adapter.node-red.3               : node-red              : ioslave5                                 - disabled, port: 1880, bind: 0.0.0.0
                        + system.adapter.node-red.4               : node-red              : iosrv3                                   -  enabled, port: 1880, bind: 0.0.0.0 (SSL)
                        + system.adapter.rest-api.0               : rest-api              : iosrv                                    -  enabled, port: 8093, bind: 0.0.0.0, run as: admin
                          system.adapter.ring.0                   : ring                  : iosrv3                                   - disabled
                        + system.adapter.scenes.0                 : scenes                : iosrv                                    -  enabled
                        + system.adapter.shelly.1                 : shelly                : iosrv                                    -  enabled, port: 9881, bind: 10.19.1.111
                        + system.adapter.simple-api.0             : simple-api            : iosrv                                    -  enabled, port: 8087, bind: 0.0.0.0, run as: admin
                          system.adapter.smartmeter.0             : smartmeter            : ioslave2                                 - disabled
                        + system.adapter.smartmeter.1             : smartmeter            : ioslave2                                 -  enabled
                        + system.adapter.smartthings.0            : smartthings           : iosrv2                                   -  enabled
                        + system.adapter.sourceanalytix.0         : sourceanalytix        : iosrv                                    -  enabled
                        + system.adapter.statistics.0             : statistics            : iosrv                                    -  enabled
                        + system.adapter.statistics.1             : statistics            : iosrv3                                   -  enabled
                        + system.adapter.telegram.0               : telegram              : iosrv3                                   -  enabled, port: 8443, bind: 0.0.0.0
                        + system.adapter.telegram.1               : telegram              : apsrv6                           -  enabled, port: 8443, bind: 0.0.0.0
                        + system.adapter.text2command.0           : text2command          : iosrv3                                   -  enabled
                        + system.adapter.tr-064.0                 : tr-064                : iosrv3                                   -  enabled
                        + system.adapter.tuya.0                   : tuya                  : iosrv3                                   -  enabled
                        + system.adapter.velux.0                  : velux                 : iosrv3                                   -  enabled
                          system.adapter.vw-connect.0             : vw-connect            : apsrv6                           - disabled
                          system.adapter.vw-connect.1             : vw-connect            : apsrv6                           - disabled
                          system.adapter.vw-connect.2             : vw-connect            : apsrv6                           - disabled
                          system.adapter.vw-connect.3             : vw-connect            : apsrv6                           - disabled
                        + system.adapter.web.0                    : web                   : iosrv3                                   -  enabled, port: 8082, bind: 0.0.0.0 (SSL), run as: admin
                          system.adapter.web.1                    : web                   : iosrv                                    - disabled, port: 8082, bind: 0.0.0.0, run as: admin
                        + system.adapter.wled.0                   : wled                  : iosrv2                                   -  enabled
                        + system.adapter.worx.0                   : worx                  : apsrv6                           -  enabled
                        + system.adapter.zigbee2mqtt.0            : zigbee2mqtt           : iosrv2                                   -  enabled
                        + system.adapter.zwave2.0                 : zwave2                : ioslave2                                 -  enabled
                        
                        + instance is alive
                        
                        Enabled adapters with bindings
                        + system.adapter.admin.0                  : admin                 : iosrv                                    -  enabled, port: 8081, bind: 0.0.0.0 (SSL), run as: admin
                        + system.adapter.hm-rpc.0                 : hm-rpc                : iosrv3                                   -  enabled, port: 0
                        + system.adapter.hm-rpc.1                 : hm-rpc                : iosrv3                                   -  enabled, port: 0
                        + system.adapter.influxdb.0               : influxdb              : iosrv                                    -  enabled, port: 8086
                        + system.adapter.mqtt.1                   : mqtt                  : iosrv2                                   -  enabled, port: 1883, bind: 0.0.0.0
                        + system.adapter.node-red.0               : node-red              : iosrv                                    -  enabled, port: 1880, bind: :: (SSL)
                        + system.adapter.node-red.2               : node-red              : iosrv2                                   -  enabled, port: 1880, bind: 0.0.0.0 (SSL)
                        + system.adapter.node-red.4               : node-red              : iosrv3                                   -  enabled, port: 1880, bind: 0.0.0.0 (SSL)
                        + system.adapter.rest-api.0               : rest-api              : iosrv                                    -  enabled, port: 8093, bind: 0.0.0.0, run as: admin
                        + system.adapter.shelly.1                 : shelly                : iosrv                                    -  enabled, port: 9881, bind: 10.19.1.111
                        + system.adapter.simple-api.0             : simple-api            : iosrv                                    -  enabled, port: 8087, bind: 0.0.0.0, run as: admin
                        + system.adapter.telegram.0               : telegram              : iosrv3                                   -  enabled, port: 8443, bind: 0.0.0.0
                        + system.adapter.telegram.1               : telegram              : apsrv6                           -  enabled, port: 8443, bind: 0.0.0.0
                        + system.adapter.web.0                    : web                   : iosrv3                                   -  enabled, port: 8082, bind: 0.0.0.0 (SSL), run as: admin
                        
                        ioBroker-Repositories
                        Stable (default): http://download.iobroker.net/sources-dist.json
                        Beta (latest) : http://download.iobroker.net/sources-dist-latest.json
                        
                        Active repo(s): Beta (latest)
                        
                        Installed ioBroker-Instances
                        Used repository: Beta (latest)
                        Adapter    "admin"        : 7.0.11   , installed 7.0.11
                        Adapter    "backitup"     : 3.0.8    , installed 3.0.8
                        Adapter    "discovery"    : 4.5.0    , installed 4.5.0
                        Adapter    "javascript"   : 8.6.0    , installed 8.6.0
                        Controller "js-controller": 6.0.6    , installed 6.0.6
                        Adapter    "mqtt"         : 5.2.0    , installed 5.2.0
                        Adapter    "node-red"     : 5.2.1    , installed 5.2.1
                        Adapter    "smartthings"  : 0.1.2    , installed 0.1.2
                        Adapter    "wled"         : 0.7.3-beta.0, installed 0.7.3-beta.0
                        Adapter    "zigbee2mqtt"  : 2.13.6   , installed 2.13.9
                        
                        Objects and States
                        Please stand by - This may take a while
                        Objects:        60055
                        States:         38922
                        
                        *** OS-Repositories and Updates ***
                        Hit:1 http://archive.ubuntu.com/ubuntu lunar InRelease
                        Hit:2 http://archive.ubuntu.com/ubuntu lunar-updates InRelease
                        Hit:3 http://archive.ubuntu.com/ubuntu lunar-security InRelease
                        Hit:4 https://deb.nodesource.com/node_20.x nodistro InRelease
                        Reading package lists...
                        Pending Updates: 1
                        
                        *** Listening Ports ***
                        Active Internet connections (only servers)
                        Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
                        tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      0          22641763   340/master          
                        tcp        0      0 0.0.0.0:1880            0.0.0.0:*               LISTEN      1000       26560773   30590/node-red      
                        tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      0          22635876   1/init              
                        tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN      996        22637916   104/systemd-resolve 
                        tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      996        22637914   104/systemd-resolve 
                        tcp6       0      0 :::22                   :::*                    LISTEN      0          22636005   1/init              
                        tcp6       0      0 :::111                  :::*                    LISTEN      0          22635878   1/init              
                        tcp6       0      0 ::1:25                  :::*                    LISTEN      0          22641764   340/master          
                        udp        0      0 127.0.0.54:53           0.0.0.0:*                           996        22637915   104/systemd-resolve 
                        udp        0      0 127.0.0.53:53           0.0.0.0:*                           996        22637913   104/systemd-resolve 
                        udp        0      0 0.0.0.0:111             0.0.0.0:*                           0          22635877   1/init              
                        udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1000       26271211   27482/io.wled.0     
                        udp6       0      0 :::111                  :::*                                0          22635879   1/init              
                        udp6       0      0 fe80::c0f3:2eff:fe5:546 :::*                                998        22640755   100/systemd-network 
                        
                        *** Log File - Last 25 Lines ***
                        
                        2024-07-09 14:58:20.536  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x00158d00027a5eac.occupancy 1720537100534 1720537100536 Diff: 2
                        2024-07-09 14:59:49.941  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x00158d00027a2c12.occupancy 1720537189940 1720537189941 Diff: 1
                        2024-07-09 15:01:11.792  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x842e14fffe888db3.occupancy 1720537264910 1720537271792 Diff: 6882
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x00158d000279d7a2.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x00158d00027a2c12.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x00158d00027a5eac.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x0017880102019335.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x0017880106f731c9.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x001788010917b044.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x0017880109181f46.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x0017880109182d1b.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x0017880109189488.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.793  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x001788010918a44c.occupancy Timestamp: 1720537271793
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x001788010bcfc276.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x001788010cd59ddc.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x001788010df66ead.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x14b457fffe6b0459.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x14b457fffe7e1d5d.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0x842e14fffe888db3.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0xccccccfffe9106ec.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.794  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG Durchlauf ID: zigbee2mqtt.0.0xecf64cfffe290e59.occupancy Timestamp: 1720537271794
                        2024-07-09 15:01:11.955  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: Sent to {"189503731":25253} users
                        2024-07-09 15:01:20.536  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x00158d00027a5eac.occupancy 1720537280535 1720537280536 Diff: 1
                        2024-07-09 15:01:30.423  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x001788010918a44c.occupancy 1720537290422 1720537290423 Diff: 1
                        2024-07-09 15:01:32.234  - info: javascript.31 (8895) script.js.Haussteuerung.BWM_Innen: BWM Innen DEBUG - ausgelöst und Script gestartet durch: zigbee2mqtt.0.0x0017880102019335.occupancy 1720537292233 1720537292234 Diff: 1
                        
                        

                        Man sieht im Log auch noch den Treffer mit Differenz von 6882ms von obj.state.ts zu Start der Ausführung der Funktion.

                        Vielleicht hat jemand ne Idee.

                        Thomas Braun paul53 2 Replies Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @pepp86 last edited by Thomas Braun

                          @pepp86 sagte in Perfomance / Delay im Javascript Adapter:

                          Operating System: Ubuntu 23.04

                          Abgekündigt, installier da was lebendiges.

                          Hampel da nicht als root durch den Container.
                          Stell das Boot Target auf multi-user.target.

                          1 Reply Last reply Reply Quote -1
                          • paul53
                            paul53 @pepp86 last edited by

                            @pepp86 sagte: Es gibt keine Scripte, die große Mengen an setState pro 15 Sekunden haben.

                            Hast du es mit allen 8 JS-Instanzen getestet?

                            P 1 Reply Last reply Reply Quote 0
                            • P
                              pepp86 @paul53 last edited by

                              @paul53
                              Ja, habe für jede Instant separat das Script erstellt damit ich auch die Top 4 pro Instanz habe.

                              1 Reply Last reply Reply Quote 0
                              • P
                                pepp86 last edited by

                                Moin,

                                ich habe jetzt viel getestet in den letzten Tagen. Inklusive Aufsetzen von Testsystemen (Debian vs. Ubuntu / Container vs. VM).
                                Es scheint, als ob das Problem mit der Javascript Instanz "mitwandert". Schiebe ich die Skripte in eine neue Instanz auf einem neuen System, läuft alles perfekt. Schiebe ich die problematische Instanz auf den neuen Host, wandern die Probleme mit.

                                Meine Frage ist nun, gibt es irgendwo "versteckte" Konfigurationen einer Instanz wo vielleicht irgendwas quer hängen kann? Jemand ne Idee? Ansonsten setze ich einfach komplett neue Instanzen auf und verschiebe alle Skripte.

                                Danke!

                                1 Reply Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky @paul53 last edited by

                                  @paul53 sagte in Perfomance / Delay im Javascript Adapter:

                                  Wenn ein Skript die Ursache ist, sollte das folgende Testskript die 4 am häufigsten sendenden Skripte im Log alle 15 s zeigen:

                                  danke dafür 🙂

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate
                                  FAQ Cloud / IOT
                                  HowTo: Node.js-Update
                                  HowTo: Backup/Restore
                                  Downloads
                                  BLOG

                                  671
                                  Online

                                  31.9k
                                  Users

                                  80.1k
                                  Topics

                                  1.3m
                                  Posts

                                  5
                                  17
                                  714
                                  Loading More Posts
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  Community
                                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                  The ioBroker Community 2014-2023
                                  logo