gen_server run slower when mailbox get bigger

15 views
Skip to first unread message

dan

unread,
Dec 9, 2016, 4:18:54 AM12/9/16
to Erlang Questions
I've got a problem, I use gen server to do some simple work like this: 
    
      one handle_cast to do a long time work(takes 60 seconds)
      one handle_cast to do a very fast work

everything is fine when traffic is low. But when the server process is working on the first long time work and client send thousands of messages to the server(1000000 messages in mailbox for example), the long time work will become extremely slow, it may takes 600 seconds to finish.


But I still don't understand. If it because of garbage collect, how could garbage collect takes so long or so frequently ?

Reply all
Reply to author
Forward
0 new messages