Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Exception : Timeout forced after due to other process - code: 3

    General usage of Z-Push
    3
    15
    2627
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • liverpoolfcfan
      liverpoolfcfan @sbourdette last edited by

      @sbourdette Do you know what the device types are?

      Some clients start individual sync requests for each folder type and each one kicks off a Ping cycle when it finishes. This can result in multiple pings running for the same device. The z-push code kills off the extra ping connections.

      1 Reply Last reply Reply Quote 0
      • liverpoolfcfan
        liverpoolfcfan last edited by

        @sbourdette @Manfred

        The other problem I see in your logs is that the WBXML decoder is consistently having issues with the WBXML commands being sent by the device

        30/01/2018 11:00:03 [ 9254] [WBXMLSTACK] [s@b.com] [secxxxxxxxxxx] WBXMLDecoder->getElementStartTag(): unmatched WBXML tag: ‘Ping:Ping’ matching ‘’ type ‘’ flags ‘’

        This needs investigation by the z-push guys - but the extract from the logs you posted does not contain enough information

        Manfred 1 Reply Last reply Reply Quote 0
        • sbourdette
          sbourdette last edited by

          You can find complete debug file for this process here debug_zpush_wbxml.log

          1 Reply Last reply Reply Quote 0
          • Manfred
            Manfred Kopano @liverpoolfcfan last edited by

            Hi @liverpoolfcfan,

            @liverpoolfcfan said in Exception : Timeout forced after due to other process - code: 3:

            @sbourdette Do you know what the device types are?

            Some clients start individual sync requests for each folder type and each one kicks off a Ping cycle when it finishes. This can result in multiple pings running for the same device. The z-push code kills off the extra ping connections.

            Devices may issue Ping command without WBXML data. In such case the cached data of previous Ping commands is used.

            When there’s no WBXML tag but Z-Push reads it (self::$decoder->getElementStartTag(SYNC_PING_PING)), there will be WBXMLSTACK log level output that the matching tag was not found. (For that matter every self::$decoder->getElementStartTag(TAG_NAME) call will generate such log entry if the tag is not available in the WBXML data). Therefore WBXMLSTACK log level is rarely necessary, WBXML is more than enough in almost all cases.

            Manfred

            1 Reply Last reply Reply Quote 0
            • liverpoolfcfan
              liverpoolfcfan last edited by

              If the device issues an empty ping - would hierarchy changes still be detected?

              For example - if a device was pinging 10 folders repeatedly with empty pings always pulling the cached request, and during the ping cycle a new folder is added, does the code that would notify a hierarchy sync needed ever get triggered, or is is skipped?

              1 Reply Last reply Reply Quote 0
              • Manfred
                Manfred Kopano last edited by Manfred

                Hi @liverpoolfcfan ,

                yes, they should because the backend is responsible for detecting changes and the request class only returns them. E.g. in Kopano backend if there were hierarchy changes we just add a notification in ChangesSync function:

                public function ChangesSink($timeout = 30) {
                        $notifications = array();
                        $hierarchyNotifications = array();
                ... content changes stuff and also add hierarchy changes to $hierarchyNotifications
                        if (!empty($hierarchyNotifications)) {
                            $hash = $this->getHierarchyHash();
                            if ($hash !== $this->changesSinkHierarchyHash) {
                                ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendKopano->ChangesSink() Hierarchy notification, pending validation. New hierarchyHash: %s", $hash));
                                $notifications[] = IBackend::HIERARCHYNOTIFICATION;
                                $this->changesSinkHierarchyHash = $hash;
                            }
                        }
                        return $notifications;
                    }
                

                The rest is then handled by ping.

                Manfred

                liverpoolfcfan 1 Reply Last reply Reply Quote 0
                • liverpoolfcfan
                  liverpoolfcfan @Manfred last edited by liverpoolfcfan

                  @manfred - For some time the code in the zimbra backend to try to recognize and handle Hierarchy changes is

                              if ( isset( $notify['created']['folder'] ) || isset( $notify['deleted']['folder'] )) {
                                  ZLog::Write(LOGLEVEL_DEBUG, 'Zimbra->ChangesSink(): ' .  'Folder Creation/Deletion - FolderSync Required ' );
                                  if (defined('SyncCollections::HIERARCHY_CHANGED')) {
                                      throw new StatusException("Zimbra->ChangesSink(): HierarchySync required.", SyncCollections::HIERARCHY_CHANGED);
                                  } else {
                                      throw new StatusException("Zimbra->ChangesSink(): HierarchySync required.", SyncCollections::ERROR_WRONG_HIERARCHY);
                                  }
                              }
                  

                  Does that still work with the latest 2.3/2.4 z-push, or do I need to write something similar to what you have in your code above instead?

                  My concern is that the ping cache might not be getting cleaned up correctly

                  1 Reply Last reply Reply Quote 0
                  • Manfred
                    Manfred Kopano last edited by

                    @liverpoolfcfan the last bigger change in ping.php was https://jira.z-hub.io/browse/ZP-1251, but I don’t think it affects the hierarchy changes. For Z-Push 2.4. we haven’t changed anything there, so I suppose your code should still get hierarchy changes in ping.

                    Manfred

                    liverpoolfcfan 1 Reply Last reply Reply Quote 0
                    • liverpoolfcfan
                      liverpoolfcfan @Manfred last edited by

                      @manfred
                      If I want to handle it in the same way as you are doing is this all I need to do whan I detect a change

                                      $notifications[] = IBackend::HIERARCHYNOTIFICATION;
                      
                      1 Reply Last reply Reply Quote 0
                      • Manfred
                        Manfred Kopano last edited by

                        @liverpoolfcfan yes, that would be all if you detect hierarchy changes in your backend. The code then checks again if the hierarchy changed by configuring a hierarchy exporter. If that’s the case it will throw StatusException with SyncCollections::HIERARCHY_CHANGED like it’s in the zimbra backend now. However in kopano we sometimes had/have not relevant hierarchy change notifications and adding the IBackend::HIERARCHYNOTIFICATION $notifications helped to solve those and spared some unnecessary requests.

                        Manfred

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