Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3978016
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:59:36+00:00 2026-05-20T04:59:36+00:00

Let me put my question as simple as below. Mine is a network router

  • 0

Let me put my question as simple as below. Mine is a network router software built in erlang, but at a particular scenario I am observing very high memory growth as shown by VM.

I have one process which receives binary packet from some other process from socket.

This process, parses the binary packet and passes the binary packet to a gen_server (handle_cast is called)

The gen_server again stores some information in ETS table and send the packet to the peer server.

When the peer server responds back the entry from the ETS is deleted and the gen_server responds back to the first process

Also if the first process (which sent packet to gen_server) gets timedout after 5 seconds waiting for response from gen_server , it also deletes the ETS entry in the gen_server and exits.

Now I am observing high memory growth when lots of events gets timed out (due to unavailability of peer server) and from what i have researched its the “**binary**” and “**processes_used**” given by erlang:memory command thats using most of the memory.

but the same is not true when events are processed successfully.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:59:37+00:00Added an answer on May 20, 2026 at 4:59 am

    The memory lost can be basically only in three places:

    1. The state of your gen_server

      • look at you state, find out if there is some big or growing stuff there
    2. Your processes mailboxes

      • see to it that there is some way to always drain unmatched messages (for gen_server handle_info callback) in normal receives a Any ->clause.

      • if the mailbox only fills up temporarily its probably because of the receiving process being too slow for the rate of messages produced. This is usually a problem for asynchronous communication. If its only temporary bursts that don’t break anything this could be intended.

        • In this case you can either optimize the receiving process

        • or fix your protocol to use fewer messages

        • if you have multiple functions that receive some messages, make sure all receiving parts are being called regularly. Dont forget the Any -> clauses.

      • Be aware that while you are processing in a gen_servers callback no messages will be received, so if you need more time in a callback that would be necessary asyncronous messages might pile up (e.g. random message arrival + fixed processing time builds a unbounded growing queue, for details see Queueing theory

    3. In your ETS table

      • maybe the information in the ETS is not be completely removed? Forgot to remove something in certain cases?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple question. Let's put on our engineer/project manager hat for a second: You have
I want to write a simple applet to put in a tray. Let's say
I know this is a simple question but for some reason I'm wondering if
This question is actually for DNA codon analysis, to put it in a simple
This might seem like a very simple question, but I am struggling with it.
Small simple question, but I cannot find the answer! Is it possible to use
Let me first put the code snippets here. I am just using the ASP.NET
Let's say I put the following code somewhere in a Master page in my
Would it be possible to put install THG on a shared drive and let
First let me explain. I have several addresses on the page that I put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.