---
title: 升级 OBServer 版本时 execute upgrade post script 耗时长导致失败-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于升级 OBServer 版本时 execute upgrade post script 耗时长导致失败相关的常见问题和使用技巧，帮助您快速解决升级 OBServer 版本时 execute upgrade post script 耗时长导致失败的难题。
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

划线反馈

# 升级 OBServer 版本时 execute upgrade post script 耗时长导致失败

更新时间：2026-06-04 01:56

适用版本： V4.0.x、V4.1.x、V4.2.x、V4.3.x、V4.4.x 内容类型：TechNote  

使用 OCP 升级 OBServer 时 execute upgrade post script 耗时长导致失败，如下图所示。

![image01](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/cluster-management/20250828when-upgrading-obj-version-executing-upgrade-post-script-takes-long-time-causes-failure01.png)

## 详细说明

这一步主要是在执行 upgrade_post 脚本，对应 `__all_rootservice_job` 中的任务类型 `UPGRADE_ALL`，如下图所示。

![image02](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/cluster-management/20250828when-upgrading-obj-version-executing-upgrade-post-script-takes-long-time-causes-failure02.png)

此任务的执行耗时与租户的数量有关的，测试下来平均每个租户耗时 120S，并且是个串行的任务，比如 30 个业务租户，那么耗时等于 `120S * 30 + 120S * 30`（还有30 个 Meta 租户）= 7200S。 当遇到报错 -4012 时（上图中的 `job_id=256` 就是超时了），只需在 OCP 上重试任务即可。

## 适用版本

OceanBase 数据库 V4.x 版本。

上一篇

[OBServer 日志为什么会打印 aos_ret->code=404, aos_ret->error_code=UnknownError](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002398202)

下一篇

[OBServer 启动报错：-4216, call web service failed](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207667) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
