---
title: 内存申请失败，出现OOM
description: "内存申请失败，Host侧日志提示EL9999返回码，有如下打印信息："
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/troubleshooting/troubleshooting_0118.html
sourcePath: /source/zh/canncommercial/900/maintenref/troubleshooting/troubleshooting_0118.html
indexId: b74bc520a49d30f367bc9b1fef701d2d135476c6eb1555768126651d98e8bed582
---
# 内存申请失败，出现OOM

#### 问题现象描述

内存申请失败，Host侧日志提示EL9999返回码，有如下打印信息：

```
[ERROR] DRV(2936187,python3):2022-04-21-14:19:39.429.481 [curpid: 2936187, 2969960][drv][devmm][devmm_alloc_managed 182]<errno:12, 6> Heap_alloc_managed out of memory. (temp_ptr=0x1; bytesize=8592031776)
[ERROR] RUNTIME(2936187,python3):2022-04-21-14:19:39.429.491 [npu_driver.cc:780]2969960 DevMemAllocHugePageManaged:report error module_type=1,
module_name=EL9999
[ERROR] RUNTIME(2936187,python3):2022-04-21-14:19:39.429.495 [npu_driver.cc:780]2969960 DevMemAllocHugePageManaged:[driver interface] halMemAlloc failed: device_id=1, size=8592031776, type=0, env_type=3, drvRetCode=6!
```


#### 可能原因

根据日志信息分析，判断为内存申请失败。可能原因：

1. 网络并行运行，导致内存不足。
2. 网络运行需要内存过大，导致内存申请失败。


#### 处理步骤

1. 查看运行网络时是否存在并行情况。
2. 查询网络运行需要内存大小或者减少batchsize，查看网络是否可以正常运行。
