---
title: "Spark 记录"
author: "7wolfs"
date: "2016-07-15T09:47:50Z"
tags: []
categories: ["互联网"]
slug: "spark"
draft: false
lastmod: "2016-07-15T09:46:14Z"
id: 2311392
url: "https://7wolfs.iteye.com/blog/2311392"
---

**1、java.lang.StackOverflowError when calling count()**

http://apache-spark-user-list.1001560.n3.nabble.com/java-lang-StackOverflowError-when-calling-count-td5649.html

http://www.iteblog.com/archives/1140

We were getting the same problem also. Funny thing our code worked with larger data set and failed for a reduced data set. Anyway we are thinking on passing stacksize override params to jvm may be that can help you. 

Please give it a try and let me know. 

--conf spark.executor.extraJavaOptions=-Xss8m --conf spark.driver.extraJavaOptions=-Xss8m 

taking 8m is kind a overkill for stack size, so you can start with 4m.