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 ?