MOBILINK: HTTP_UNKNOWN_SESSION Errors During Synchronization

Problem: An application randomly gets a MOBILINK: HTTP_UNKNOWN_SESSION error during synchronization when using an Apache reverse proxy to connect the device to SAP Mobile Server.

Explanation: The Apache reverse proxy aggressively maintains persistent connections to SAP Mobile Server. When the UltraLite® database completes a synchronization, it closes the socket used for the synchronization. The SAP Mobile Server MobiLink component expects the socket to close as well, but the socket that closes is between the Ultralite database and the Apache reverse proxy, and the proxy connection to MobiLink remains intact. This is not what MobiLink expects, and if a new synchronization attempts to reuse the same MobiLink connection to the reverse proxy, this error can occur.

Solution: Change the configuration of the reverse proxy so that it does not maintain a persistent connection between it and the SAP Mobile Server MobiLink component. This assures that when the synchronization session completes, the connection is closed and not reused. Set disablereuse=on in the Apache reverse proxy:
<IfModule proxy_module>
    ProxyPass [path] [url] disablereuse=on
    ProxyPassReverse [path] [url]
</IfModule>