<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>persist the syncml state in multiserver environments</title> 
  <pubDate>Fri, 10 Apr 2026 13:09:15 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7394</link> 
  <atom:link rel="self" type="application/rss+xml" title="persist the syncml state in multiserver environments" href="https://bugs.horde.org/ticket/7394/rss" /> 
  <description>persist the syncml state in multiserver environments</description> 
 
   
   
  <item> 
   <title>I&#039;m not sure if this is a bug therefore I write this feature</title> 
   <description>I&#039;m not sure if this is a bug therefore I write this feature request:



In a setup which uses multiple loadbalanced servers with a shared session backend (memcached) it can happen that the loadbalancer redirects requests which belong to the same sync session to different servers, e.g. when the database (calendar for e.g.) is large the sync is divided into more then one request:



Here is a log for such a case:

DEBUG:  Backend of class SyncML_Backend_Horde created

DEBUG:  Started at 2008-09-25 20:49:48. Packet logged in /tmp/sync/client_10.wbxml

DEBUG:  New session created: 3baf28e3f425a8aa4cb8281f978e16ee

DEBUG:  Checking authentication for user riederd

DEBUG:  Authenticated: yes; version: 1.2; message ID: 1; source URI: IMEI:xxxxxxxxxxxxxx; target URI: ....

[....]

DEBUG:  Return message completed

DEBUG:  Finished at 2008-09-25 20:49:48. Packet logged in /tmp/sync/server_10.wbxml



DEBUG:  Backend of class SyncML_Backend_Horde created

DEBUG:  Started at 2008-09-25 20:49:55. Packet logged in /tmp/sync/client_11.wbxml

DEBUG:  Existing session continued: 3baf28e3f425a8aa4cb8281f978e16ee

DEBUG:  Authenticated: yes; version: 1.2; message ID: 2; source URI: IMEI:xxxxxxxxxxxxxx; target URI: ....

DEBUG:  Created device class SyncML_Device_Nokia

DEBUG:  Created device class SyncML_Device_Nokia

DEBUG:  Received &lt;Final&gt; from client.

DEBUG:  Handle &lt;Final&gt; for state Sync

DEBUG:  Creating &lt;Sync&gt; output for server changes in database ./notes

DEBUG:  Created device class SyncML_Device_Nokia

DEBUG:  Compiling server changes from 1970-01-01 01:00:00 to 2008-09-25 20:49:48

[...]

DEBUG:  Sending add from server: 20070628193702.@webmail.tugraz.at

DEBUG:  Sending add from server: 20070628193732.@webmail.tugraz.at

DEBUG:  Maximum message size 65535 approached during add; current size: 65072

DEBUG:  Return message completed

DEBUG:  Finished at 2008-09-25 20:50:00. Packet logged in /tmp/sync/server_11.wbxml



the next request is switched to another server, which results into a authentication error:



DEBUG:  Backend of class SyncML_Backend_Horde created

DEBUG:  Started at 2008-09-25 20:50:16. Packet logged in /tmp/sync/client_10.wbxml

DEBUG:  New session created: 3baf28e3f425a8aa4cb8281f978e16ee

DEBUG:  Invalid authentication

DEBUG:  Authenticated: no; version: 1.2; message ID: 3; source URI: IMEI:xxxxxxxxxxxxxx; target URI:

ERR:    Not authenticated while processing MapItem

ERR:    Not authenticated while processing MapItem

[....]

ERR:    Not authenticated while processing MapItem

DEBUG:  Return message completed

DEBUG:  Finished at 2008-09-25 20:50:17. Packet logged in /tmp/sync/server_10.wbxml



It seems that $_SESSION[&#039;SyncML.state&#039;] gets lost between the requests when they go from different servers.

In other Horde applications (like IMP) it is no problem when different requests go to different servers.



Would it be possible to keep the Session active for different servers?</description> 
   <pubDate>Thu, 25 Sep 2008 19:15:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49242</link> 
  </item> 
   
  <item> 
   <title>Synching uses regular PHP sessions, with the only difference</title> 
   <description>Synching uses regular PHP sessions, with the only difference that the session id is not passed by cookie or url parameter, but in the sync packet.

Is synching not using the configured session handler in your case?</description> 
   <pubDate>Thu, 25 Sep 2008 19:34:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49243</link> 
  </item> 
   
  <item> 
   <title>&gt; Synching uses regular PHP sessions, with the only differen</title> 
   <description>&gt; Synching uses regular PHP sessions, with the only difference that the 

&gt; session id is not passed by cookie or url parameter, but in the sync 

&gt; packet.

&gt; Is synching not using the configured session handler in your case?



well I think/hope that it is using the same session handler as all the other Horde parts.



Here is what I&#039;ve set in conf.php for sessions:



$conf[&#039;session&#039;][&#039;name&#039;] = &#039;Horde&#039;;

$conf[&#039;session&#039;][&#039;use_only_cookies&#039;] = true;

$conf[&#039;session&#039;][&#039;cache_limiter&#039;] = &#039;nocache&#039;;

$conf[&#039;session&#039;][&#039;timeout&#039;] = 0;

[...]

$conf[&#039;sessionhandler&#039;][&#039;params&#039;][&#039;track&#039;] = true;

$conf[&#039;sessionhandler&#039;][&#039;type&#039;] = &#039;memcache&#039;;

$conf[&#039;sessionhandler&#039;][&#039;memcache&#039;] = true;



I can not think at anything how syncing should use something else?

</description> 
   <pubDate>Thu, 25 Sep 2008 20:08:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49246</link> 
  </item> 
   
  <item> 
   <title>The _backendMode is not set on the server when a loadbalance</title> 
   <description>The _backendMode is not set on the server when a loadbalancer directs the client to another machine.

The attached patch fixes the problem.</description> 
   <pubDate>Thu, 02 Oct 2008 21:13:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49356</link> 
  </item> 
   
  <item> 
   <title>Committed, thanks.</title> 
   <description>Committed, thanks.</description> 
   <pubDate>Tue, 07 Oct 2008 12:47:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49435</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/SyncML/SyncML/Backend/Horde.php?r1=1.8.2.14&amp;r2=1.8.2.15&amp;ty=u</description> 
   <pubDate>Tue, 07 Oct 2008 12:47:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7394#t49436</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
