function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
copyholdcopyhold 

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader after long wait

he||o all

I have a daemon that once being connected, uses the same connection for all requests.

But when there are no queries to process for ~20 hours (can't be more accurate) it seems (I guess) it's session expires.

 

How to check the connection validity? Otr how to estimate expiration time? So I will reconnect before.

 

thanks.

AngryRostAngryRost

read this http://na5.salesforce.com/help/doc/en/admin_sessions.htm (Timeout value)

 

you can use getUserInfo() call and check its sessionSecondsValid property