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>