Re: [Asterisk-java-devel] ServiceLevelTimer problem
Brought to you by:
srt
From: Brett S. <bs...@no...> - 2012-10-11 12:54:23
|
I wouldn't panic about the threads unless the number grows over time or they start thrashing the CPU. Jac...@L-... wrote: >Adrian, > >You should be able to handle this with only one connection to asterisk. >You do not need to open/close your connection to Asterisk every time >you >need to run a different job. I use asterisk-java in a glassfish server >as well. I open one connection at start of day (Start of Server) and >maintain that one connection until the server is stopped. This way you >can post as many Actions to the server and receive all Events coming >back with one connection. Although I do not use queues at all so I do >not see this generation of numerous threads, it does open a few. I am >processing several hundred calls daily so the number of calls should >not >matter. > > >Jacob > >-----Original Message----- >From: Videanu Adrian [mailto:vid...@ya...] >Sent: Thursday, October 11, 2012 1:03 AM >To: ast...@li... >Subject: Re: [Asterisk-java-devel] ServiceLevelTimer problem > > >Hi Brett, >yes indeed, ideally is to open one connection and then use that one, >only that i have different jobs to do on asterisk server when i receive >some webservice calls. I have 40-50 calls (asterisk connects) daily, >but >every connect generates a lot of threads because i have a lot of queues >:( > >regards, >Adrian Videanu > > >--- On Thu, 10/11/12, Brett Sutton <bs...@no...> wrote: > >> From: Brett Sutton <bs...@no...> >> Subject: Re: [Asterisk-java-devel] ServiceLevelTimer problem >> To: ast...@li... >> Date: Thursday, October 11, 2012, 8:22 AM Not certain about the >> threads with asteriskjava live but just a note of caution. You want >to > >> minimise the number of connections to asterisk. >> Generally you should just have a single connection (which actually >> results in two open sockets (reader and a writer)) which you keep >open > >> (you need to handle disconnects). >> >> Brett >> >> >> >> On 11/10/12 16:17, Videanu Adrian wrote: >> > Hi all, >> > I develop a application using asteriskJava, running on >> glassfish and i encountered some issues related to the >> number of threads opened every time i connect to asterisk >> server. >> > So, my setup is as follows: >> > 1. i connect to the asterisk server using the live >> class AsteriskServer asteriskServer = new >> DefaultAsteriskServer(user,pass....) >> > 2. after the connection is done I observed a number of >> threads equal to the number of my queues (from asterisk) >> opened, with names like ServiceLevelTimer-QueueName >> > >> > I thought that when i access asteriskServer.shutdown() >> these threads will be closed automatically, but this is not >> happening. >> > Is this the expected behavior or this a bug ? >> > >> > I have to mention that i do not have any class that >> implements AsteriskQueueListener. >> > >> > PS. my situation is even more complicated because i >> perform a lot of connect/disconnect cycles and i end up with >> a lot of threads with status waiting. >> > >> > Regards, >> > Adrian Videanu >> > >> > >> >------------------------------------------------------------------------ >------ >> > Don't let slow site performance ruin your business. >> Deploy New Relic APM >> > Deploy New Relic app performance management and know >> exactly >> > what is happening inside your Ruby, Python, PHP, Java, >> and .NET app >> > Try New Relic at no cost today and get our sweet Data >> Nerd shirt too! >> > http://p.sf.net/sfu/newrelic-dev2dev >> > _______________________________________________ >> > Asterisk-java-devel mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel >> >> >> >------------------------------------------------------------------------ >------ >> Don't let slow site performance ruin your business. Deploy >> New Relic APM >> Deploy New Relic app performance management and know >> exactly >> what is happening inside your Ruby, Python, PHP, Java, and >> .NET app >> Try New Relic at no cost today and get our sweet Data Nerd >> shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Asterisk-java-devel mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel >> > >------------------------------------------------------------------------ >------ >Don't let slow site performance ruin your business. Deploy New Relic >APM >Deploy New Relic app performance management and know exactly >what is happening inside your Ruby, Python, PHP, Java, and .NET app >Try New Relic at no cost today and get our sweet Data Nerd shirt too! >http://p.sf.net/sfu/newrelic-dev2dev >_______________________________________________ >Asterisk-java-devel mailing list >Ast...@li... >https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > >------------------------------------------------------------------------------ >Don't let slow site performance ruin your business. Deploy New Relic >APM >Deploy New Relic app performance management and know exactly >what is happening inside your Ruby, Python, PHP, Java, and .NET app >Try New Relic at no cost today and get our sweet Data Nerd shirt too! >http://p.sf.net/sfu/newrelic-dev2dev >_______________________________________________ >Asterisk-java-devel mailing list >Ast...@li... >https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. |