# 数据导出或者导入时发生OOM异常

## 现象描述：

![OOM异常](https://3148786149-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LmN_rNQCcekD6lUTyjN%2F-Lt46pUNPEic_7Qla1UT%2F-Lt47nJGGXKwaNrGLaxt%2FQQ%E5%9B%BE%E7%89%8720191107164304.png?alt=media\&token=d0e2f39e-9084-45fd-9328-ed6c2c305f1e)

```
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit 
    at java.lang.StringCoding.encode(StringCoding.java.350)
    at java.lang.String.getBytes(String.java.941)
    at org.apache.commons.io.IOUtils.write(IOUtils.java:1527)
```

## 解决方法：

1、在o2server/configSample目录中COPY文件到o2server/config目录中：

&#x20;    1\) dumpRestoreData.json&#x20;

&#x20;    2\) dumpRestoreStorage.json

2、将两个文件配置中的batchSize值 全部改为500（默认为2000）&#x20;

![修改配置文件](https://3148786149-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LmN_rNQCcekD6lUTyjN%2F-Lt46pUNPEic_7Qla1UT%2F-Lt48Y8zj9EnMTY6JNWI%2FQQ%E6%88%AA%E5%9B%BE20191107171552.png?alt=media\&token=928395eb-608c-43bd-93f8-bb8035c4806a)

3、重启服务器，再尝试导出或者导入操作。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://o2oa.gitbook.io/course/chang-jian-cuo-wu/shu-ju-dao-chu-huo-zhe-dao-ru-shi-fa-sheng-oom-yi-chang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
