You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

技术问询

  1. 导致数据库连接冻结的原因是什么?
  2. 是否可以查询Snowflake接收的每个请求的数据库日志,以确认请求被Snowflake接收的时间?

内容的提问来源于stack exchange,提问作者Pingpong

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 08:54:59