When Sakuli crashes with an “Invalid session id” error, the webdriver itself crashed or least closed the session the Sakuli test or check is using. Such a behavior mostly occurs, when the provided resources for the Sakuli execution are insufficient. When testing bigger websites, please check if enough SHM space is available.