---
title: "hive 的is running beyond physical memory limits 错误解决"
author: "hbjava1985"
date: "2015-01-21T10:14:52Z"
tags: []
categories: ["开源软件"]
slug: "hive-is-running-beyond-physical-memory-limits"
draft: false
lastmod: "2015-01-21T10:15:20Z"
id: 2177910
url: "https://hbjava1985.iteye.com/blog/2177910"
---

用hive跑一个比较复杂包含子查询数据量大的sql,报错

```shell

Container [pid=48338,containerID=container_1417574466181_3484_01_000043] is running beyond physical memory limits. Current usage: 1.0 GB of 1 GB physical memory used; 2.0 GB of 2.1 GB virtual memory used. Killing container. Dump of the process-tree for container_1417574466181_3484_01_000043 : |- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE |- 48345 48338 48338 48338 (java) 2432 61 2062110720 272981 

```

解决方法,hive脚本中增加

```shell

set mapred.child.java.opts=-Xmx2048m;

```