For 2 & 4:
You're right - for web or short term applications. Net::XMPP is used for IM connections and those are usually long-life. If there is any real memory leak (which increases the used memory over time even without additional data being stored), it will become a problem, sooner or later.
Let the final script run for a hour or day and everything might be fine, but if it's logged into XMPP for weeks or even longer, memory usage will grow endless.
The problem is even worse, because there are running multiple instances (dosn't matter if they are processes or threads).
Restarting the whole application from time to time is bad, even if the new process re-logins to XMPP after some seconds. The problem will catch you sooner or later even if you try to reboot the app depending on memory usage.
| [reply] |
1. Sure, there was a leak. I could see it even without Test::Memory::Cycle but using that module helped me locate it and fix it. Thanks for pointing in it out.
2. Sure there is a pressure. We made some simple calculations of how much memory we will need and it it was more than what the servers can handle.
3. Wasn't my question exactly about how to measure?
| [reply] |