Announcement

Collapse
No announcement yet.

mcsMQTT - Slow initial config page load

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Michael McSharry View Post
    As of 5.4.0.0 mcsMQTT (any page) will delay response to browser requests until it completes initialization. In developer mode the console will show progress through initialization with the last line being "initialization complete". Can you enable developer mode to view this? If you wait a few minutes do you still get slow MQTT page loads?
    Developer mode is enabled in that screenshot.
    I'm now at more than 12 hours of uptime, and the page load times for /MQTT are just as slow as the screenshot.
    However, there doesn't seem to be an update to the latest version I have (5.3.0.4) if this is a manual change, I'll go update and confirm what I'm seeing.

    Comment


      #17
      Current version is http://mcsSprinklers.com/mcsMQTT_5_4_0_5.zip. mcsMQTT_2020.dll goes in \bin\mcsMQTT folder. HSPI_MCSMQTT.exe goes in HS folder. Developer mode does bring up a console window when a plugin is started, but may not help. It may be related to an error raised during load that aborts the page. Anything in the HS log?

      Comment


        #18
        Originally posted by Michael McSharry View Post
        Current version is http://mcsSprinklers.com/mcsMQTT_5_4_0_5.zip. mcsMQTT_2020.dll goes in \bin\mcsMQTT folder. HSPI_MCSMQTT.exe goes in HS folder. Developer mode does bring up a console window when a plugin is started, but may not help. It may be related to an error raised during load that aborts the page. Anything in the HS log?
        Same load issues; https://i.imgur.com/j8sbhP3.gif

        The HS log is clean and would appear to show relatively quick loading except you can see the ~30+ second delay between 'initializing' and 'connected to broker'.
        Jul-21 11:32:57 Event Event Trigger ...
        Jul-21 11:32:56 mcsMQTT MQTTClient is Connected to broker 1 at 192.168.1.139
        Jul-21 11:32:22 Plug-In Finished initializing plug-in mcsMQTT
        Jul-21 11:32:22 Starting Plug-In mcsMQTT loaded in 1101 milliseconds
        Jul-21 11:32:22 Starting Plug-In Plugin mcsMQTT started successfully in 152 milliseconds
        Jul-21 11:32:22 Starting Plug-In Initializing plugin mcsMQTT ...
        Attempting to do anything else in HS at the same time as the page load results in extremely poor performance, (e.g. opening the log). Both actions eventually get processed, but there is a significatnt impact.

        Comment


          #19
          If you use a password for the broker then reenter the password. Somebody else reported a similar issue today and their log showed the broker did not accept the password. There was a fix for multi-broker password encryption that caused the need to change the encryption.

          Comment


            #20
            Originally posted by Michael McSharry View Post
            If you use a password for the broker then reenter the password. Somebody else reported a similar issue today and their log showed the broker did not accept the password. There was a fix for multi-broker password encryption that caused the need to change the encryption.
            I disconnected from the broker. Cleared the password and then retyped it. Still experiencing a ~30s delay on opening the config page.
            Prior to re-entering it, the broker and mcsMQTT worked. It is however extremely painful to configure when it takes so long to navigate the configuration pages.



            Comment


              #21
              The best information available is the debug log that is enabled from General tab and output goes to \data\mcsMQTT\mcsMQTT debug.txt.

              Comment


                #22
                I'll enable debugging and get back to you;

                I rebooted the server, and mcsMQTT was stuck at 'pending':
                Click image for larger version

Name:	2020-07-21_190821.png
Views:	44
Size:	6.9 KB
ID:	1404597

                I turned it off, restarted again and it's still stuck at pending.

                However, it's listed in the menu and when I launch it: https://i.imgur.com/tOxkQm5.gif

                This is the only time I've ever seen it move quickly.

                Comment


                  #23
                  After a few hours the pending cleared. It's still quick. The only other settings I changed were the client id (I had a dash in it, which I removed) and the LWT topic, which I just cleaned up (had an unnecessary topic I had decided not to use).

                  Comment


                    #24
                    I suspect the CPU use occurred when the library used to connect to broker did not have success. It probably waited using up CPU cycles and then 10 seconds later mcsMQTT tried again so it kept the CPU use high. I have no idea why HS status is Pending since the handshake with HS to start the plugin finished before an attempt was made to connect to broker.

                    Comment

                    Working...
                    X