# Socket connection refused

**URL:** <https://discuss.hail.is/t/socket-connection-refused/3989>\
**Category:** Hail Query & hailctl\
**Created:** [November 12, 2024, 6:44pm UTC](https://discuss.hail.is/t/socket-connection-refused/3989 "2024-11-12T18:44:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trisha\_Karani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/trisha_karani/32/1188_2.png) [@Trisha\_Karani](https://discuss.hail.is/u/Trisha_Karani)\
**Post date:** [November 12, 2024, 6:44pm UTC](https://discuss.hail.is/t/socket-connection-refused/3989/1 "2024-11-12T18:44:45Z")

</div>

I am running hail locally and seem to be getting BrokenPipeError and ConnectionRefusedError. I haven’t experienced these errors before, any suggestions for how to resolve? Currently, I’ve just been restarting the kernel in my Jupyter notebook.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/2X/9/9936df9f11ad8b3cc9442fbcaa732b82f22a89ad.png)

---

<div class="post-metadata">

**Author:** ![Trisha\_Karani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/trisha_karani/32/1188_2.png) [@Trisha\_Karani](https://discuss.hail.is/u/Trisha_Karani)\
**Post date:** [November 12, 2024, 6:45pm UTC](https://discuss.hail.is/t/socket-connection-refused/3989/2 "2024-11-12T18:45:14Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/2X/5/5a5e61c54b27bcbfd607d854bc3bd696c89a8542.png)

---

<div class="post-metadata">

**Author:** ![ehigham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/ehigham/32/943_2.png) [@ehigham](https://discuss.hail.is/u/ehigham)\
**Post date:** [November 12, 2024, 7:04pm UTC](https://discuss.hail.is/t/socket-connection-refused/3989/3 "2024-11-12T19:04:57Z")

</div>

Hi @Trisha_Karani ,

Sounds like you’re running out of memory on the driver. Our error messages are really bad in this case and we have outstanding work to improve this. Sorry about that.

Are you default-initialising hail in your notebook? Hail uses spark by default and you can configure how much memory the driver has with the `spark_conf` parameter:

[Hail | Hail Query Python API](https://hail.is/docs/0.2/api.html#hail.init) (see `spark_conf`)

Here’s a link to various spark config paramters: [Configuration - Spark 3.5.2 Documentation](https://spark.apache.org/docs/3.5.2/configuration.html#application-properties)  
You probably want to increase `spark.driver.memory`, perhaps start with 8G and go from there.

Hope this helps! Let me know if you’re still having this issue.

Ed
