程序员茄子
全部
编程
代码
资讯
案例
综合
联系我们
SQLAlchemy 相关技术文章
php
mysql
shell
go
vue
css
api接口对接
支付接口对接
SQLAlchemy 1.4 升 2.0:函数里各自 session.begin() 开始抛 InvalidRequestError,rollback 也不再只退一层
编程
SQLAlchemy 1.4 升 2.0:函数里各自 session.begin() 开始抛 InvalidRequestError,rollback 也不再只退一层
2026-11-24 00:06:08
1.4 里靠嵌套 session.begin() 做事务边界的代码,升到 2.0 后直接抛 InvalidRequestError: A transaction is already begun on this Session。subtransaction 已被移除,commit 总是发 COMMIT,rollback 总是回滚整个事务栈。本文给出 autobegin 触发路径、官方兼容 contextmanager、最外层 begin 与 begin_nested 三种写法的代价,以及 in_transaction 系列判据和迁移自查清单。
SQLAlchemy
Python
ORM
事务
SAVEPOINT
升级迁移
排错
一个 AsyncSession 交给 asyncio task:报 another operation is in progress,还是 15 个池位先被扇出除光
编程
一个 AsyncSession 交给 asyncio task:报 another operation is in progress,还是 15 个池位先被扇出除光
2026-11-24 00:04:36
同一个 AsyncSession 被 asyncio.gather 里的多个 task 共用时,asyncpg 报 another operation is in progress,而不是等超时。本文按异常原文分叉给出排查顺序,算出 pool_size=5、max_overflow=10 下扇出对并发天花板的实际影响,并给出 per-task session、selectinload、expire_on_commit=False 的正确接线,以及 3.11 上取消信号丢失的版本边界。
SQLAlchemy
Python
FastAPI
asyncpg
异步编程
连接池
排错
Postgres 连接风暴:97 个可用槽位、三条 FATAL 与四个默认为 0 的超时
编程
Postgres 连接风暴:97 个可用槽位、三条 FATAL 与四个默认为 0 的超时
2026-10-21 21:31:38
Postgres 连接耗尽多数不是单点 bug,而是池大小算术、重启惊群和重试放大叠出来的。这篇把 97 个可用槽位、三条 FATAL 原文、四个默认为 0 的超时和 full jitter 重试串成一条可落地的排查与整改路径。
PostgreSQL
连接池
运维
PgBouncer
SQLAlchemy
大家都在搜索什么?
devops
易支付
一个官网+多少钱
统一接受回调
统一回调
python
sub
node
宝塔日志
mysql
shell
ElasticSearch
css
vue
api接口对接
2025
支付接口对接
go
php
php回调