Snowflake数据库间歇性连接冻结问题排查求助
我们运行着一个基于Python的Azure Function App,通过以下代码连接Snowflake数据库:
from sqlalchemy import create_engine from sqlalchemy.engine import Connection engine = create_engine(conn_str) connection = engine.connect().execution_options(autocommit=autocommit)
使用的依赖包版本如下:
snowflake-connector-python==2.7.9 numpy==1.23.0 pandas==1.3.5 snowflake-connector-python[pandas]==2.7.9 sqlalchemy==1.4.41 snowflake-sqlalchemy==1.5.0
但有时在OCSP校验后连接会冻结,相关日志如下:
2023-10-03 17:24:40.897 Snowflake Connector for Python Version: 2.7.9, Python Version: 3.9.18, Platform: Linux-5.15.116.1-1.cm2-x86_64-with-glibc2.31 Information 2023-10-03
17:24:40.904 This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity. Information
2023-10-03 17:24:40.769 Timeout value of 00:30:00 exceeded by function 'Functions.test_function' (Id: 'xxx-xx-xx-xx-xx'). Initiating cancellation. Error
技术问询
- 导致数据库连接冻结的原因是什么?
- 是否可以查询Snowflake接收的每个请求的数据库日志,以确认请求被Snowflake接收的时间?
内容的提问来源于stack exchange,提问作者Pingpong

