fix(worker): OSS上传崩溃修复 - connect超时 + 分片上传 + 总超时保护 #238
Reference in New Issue
Block a user
Delete Branch "fix/oss-upload-crash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
staging worker 在 OSS 上传阶段崩溃/卡死:3 个 one_take 任务渲染完成后,日志停在「OSS上传开始」,之后无任何输出,worker 进程从容器内消失。
根因分析(按概率排序)
oss_bucket()未配置connect_timeout,网络抖动时 TCP 握手阶段无限挂起put_object_from_file一次性加载到内存,大文件场景内存峰值高修复内容
1. oss_bucket() 增加 connect_timeout=10s
2. upload_to_oss() 大文件自动分片上传
3. upload_to_oss() 总超时保护(300s)
测试
071535826cto7b113d67eb7b113d67ebto0bcefc74580bcefc7458to9b55b88edb