---
title: "Discussion on \"Using Phoenix Channels? High Memory Usage? Save Money With ERL_FULLSWEEP_AFTER - Phoenix Series\" | Hashnode"
description: "Discussion on \"Using Phoenix Channels? High Memory Usage? Save Money With ERL_FULLSWEEP_AFTER - Phoenix Series\". Phoenix Channels are amazing. They make using WebSocket connections a breeze. They are even more lovely using them with Absinthe, a GraphQL server implementation, and GraphQL Connections.\nBut over time, I discovered Phoenix Channels has a downside. I..."
url: "https://hashnode.com/posts/using-phoenix-channels-high-memory-usage-save-money-with-erlfullsweepafter/6557c659cf0968334f1a30ea"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using Phoenix Channels? High Memory Usage? Save Money With ERL\_FULLSWEEP\_AFTER - Phoenix Series](https://blog.guzman.codes/using-phoenix-channels-high-memory-usage-save-money-with-erlfullsweepafter?utm_source=hashnode&utm_medium=feed)

Phoenix Channels are amazing. They make using WebSocket connections a breeze. They are even more lovely using them with Absinthe, a GraphQL server implementation, and GraphQL Connections. But over time, I discovered Phoenix Channels has a downside. I...

Nov 17, 2023 · 5 min read · blog.guzman.codes  
Updated Dec 3, 2023  
Read the article

-   [#phoenix-channels](https://hashnode.com/tag/phoenix-channels)
-   [#elixir](https://hashnode.com/tag/elixir)
-   [#phoenix](https://hashnode.com/tag/phoenix)
-   [#memory-management](https://hashnode.com/tag/memory-management)
-   [#garbagecollection](https://hashnode.com/tag/garbagecollection)

## Written by

[Erik Guzman](https://hashnode.com/@Talk2meGooseman)

@Talk2meGooseman

  
[View profile](https://hashnode.com/@Talk2meGooseman)

## Responses 2

Markdown supported · ⌘↵ to post

[Pau Riosa](https://hashnode.com/@pauriosa)

[Feb 19, 2024](https://hashnode.com/posts/using-phoenix-channels-high-memory-usage-save-money-with-erlfullsweepafter/6557c659cf0968334f1a30ea/comment/65d3956510734d61edd33ba7)

Thank you for this article.

[Arpan Ghoshal](https://hashnode.com/@ArpRokz)

[Dec 1, 2023](https://hashnode.com/posts/using-phoenix-channels-high-memory-usage-save-money-with-erlfullsweepafter/6557c659cf0968334f1a30ea/comment/6569adfe44cdf745ef5b1909)

Nice article, one more idea to try is to periodically run `erlang:garbage_collect()` on the Phoenix channel process.

[Erik Guzman](https://hashnode.com/@Talk2meGooseman)

[Dec 2, 2023](https://hashnode.com/posts/using-phoenix-channels-high-memory-usage-save-money-with-erlfullsweepafter/6557c659cf0968334f1a30ea/comment/6569adfe44cdf745ef5b1909#reply-656b602003318819fa36ba54)

Yeah! I read about this also. The book covered `​:erlang​.garbage_collect(pid)` and `GenServer.call(pid, ​:clear_hibernate​)` for your own GenServers
