Summary | persist the syncml state in multiserver environments |
Queue | Synchronization |
Type | Enhancement |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | adrieder (at) sbox (dot) tugraz (dot) at |
Created | 09/25/2008 (6135 days ago) |
Due | 09/26/2008 (6134 days ago) |
Updated | 10/07/2008 (6123 days ago) |
Assigned | |
Resolved | 10/07/2008 (6123 days ago) |
Milestone | |
Patch | No |
http://cvs.horde.org/diff.php/framework/SyncML/SyncML/Backend/Horde.php?r1=1.8.2.14&r2=1.8.2.15&ty=u
Assigned to Jan Schneider
State ⇒ Resolved
New Attachment: Horde.php.patch
the client to another machine.
The attached patch fixes the problem.
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?
other Horde parts.
Here is what I've set in conf.php for sessions:
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
[...]
$conf['sessionhandler']['params']['track'] = true;
$conf['sessionhandler']['type'] = 'memcache';
$conf['sessionhandler']['memcache'] = true;
I can not think at anything how syncing should use something else?
State ⇒ Feedback
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?
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ persist the syncml state in multiserver environments
Due ⇒ 09/26/2008
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
State ⇒ New
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 <Final> from client.
DEBUG: Handle <Final> for state Sync
DEBUG: Creating <Sync> 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['SyncML.state'] 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?