Error: Token Expired
Issue
Snowflake destination fails syncs. The following error appears:
Token Expired. Error: JDBC driver internal error: Max retry reached for the download of chunk <chunk>.
Environment
Destination: Snowflake
Resolution
To resolve this issue, do the following:
- Contact the Snowflake support team to confirm whether your organization can set the
OAUTH_REFRESH_TOKEN_VALIDITYparameter to 24 hours. If permitted, update the parameter in Snowflake. For more information, see the Snowflake ALTER SECURITY INTEGRATION documentation. - Break down large queries or improve performance where possible to finish within the current token window.
- Ensure your JDBC driver and related clients are up to date to avoid compatibility issues. To learn more, see the Snowflake DOWNLOADING/INTEGRATING THE JDBC DRIVER documentation.
Cause
This error occurs when Snowflake session authentication token expires. By default, these tokens are valid for 6 hours. If a sync involves a large dataset or a long-running query, the token may expire before the operation completes, resulting in an authentication failure and premature sync termination.