[SIP Beyond VoIP] SylkServer uses too much memory

Saúl Ibarra Corretgé saul at ag-projects.com
Thu Feb 14 09:57:58 CET 2013


On Feb 14, 2013, at 8:09 AM, Record Route wrote:

> Each time a request received by Sylk, get application method called by the __init__.py under sylk/applcation folder, and it instantiates  application instance time
> 
>     def get_application(self, ruri, headers):
>         if SYLK_APP_HEADER in headers:
>             application = headers[SYLK_APP_HEADER].body.strip()
>         else:
>             application = ServerConfig.default_application
>             if self.application_map:
>                 prefixes = ("%s@%s" % (ruri.user, ruri.host), ruri.host, ruri.user)
>                 for prefix in prefixes:
>                     if prefix in self.application_map:
>                         application = self.application_map[prefix]
>                         break
>         try:
>             app = (app for app in ApplicationRegistry() if app.__appname__ == application).next()
>         except StopIteration:
>             log.error('Application %s is not loaded' % application)
>             raise ApplicationNotLoadedError
>         else:
>             return app()         # This is the line I'm trying to mention.
> 

Those are the application objects, which are indeed singletons, so memory won't grow after startup because they are instantiated only once throughout the lifetime of the process.


--
Saúl Ibarra Corretgé
AG Projects





More information about the SIPBeyondVoIP mailing list