Thread: [Asterisk-java-users] AGI script problem
Brought to you by:
srt
From: Jonathan A. <jau...@st...> - 2006-05-30 18:43:25
|
I have been experiencing a problem when launching multiple AGI scripts. What happens is that if more than 10 calls come into the Asterisk server, the first 10 connect OK but the remaining calls hang until the first 10 complete. For instance, if 15 calls come in the Asterisk server I see 15 SIP invite messages and the server responds with 15 TRYING messages, but only 10 OK messages. The remaining scripts hang until they either timeout or the initial 10 complete and then allow the remaining scripts to continue. I am running Asterisk v1.2.7.1 and Asterisk-Java v0.2. Has anyone else experienced this issue and what can I do about it? Jonathan Augenstine |
From: Chris H. <ch...@as...> - 2006-05-31 20:01:47
|
-----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Jonathan Augenstine Sent: Tuesday, May 30, 2006 1:43 PM To: ast...@li... Subject: [Asterisk-java-users] AGI script problem --I have been experiencing a problem when launching multiple AGI --scripts. What happens is that if more than 10 calls come into the --Asterisk server, the first 10 connect OK but the remaining calls hang --until the first 10 complete. For instance, if 15 calls come in the --Asterisk server I see 15 SIP invite messages and the server responds --with 15 TRYING messages, but only 10 OK messages. The remaining --scripts hang until they either timeout or the initial 10 complete and --then allow the remaining scripts to continue. I am running Asterisk --v1.2.7.1 and Asterisk-Java v0.2. Has anyone else experienced this --issue and what can I do about it? If I'm not mistaken there is a setting for the default thread pool size. Bump that up if you have more concurrent agi connection. Ah....here it is: private static final int DEFAULT_POOL_SIZE = 10 Chris _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.0/352 - Release Date: 5/30/2006 |
From: Stefan R. <sr...@re...> - 2006-05-31 21:45:12
|
Chris Howard wrote: > If I'm not mistaken there is a setting for the default thread pool size. > Bump that up if you have more concurrent agi connection. Ah....here it > is: > > private static final int DEFAULT_POOL_SIZE = 10 right. though there is no need to change the sources. From the tutorial: Configuration You can tune the DefaultAgiServer by setting two properties: The bindPort and the poolSize. The bindPort determines the TCP port the server will listen on. By default this is the FastAGI port 4573. If you change it make sure to include the new port in the URLs used in extensions.conf. When using bindPort 1234 your extensions.conf will contain: exten => 1300,1,Agi(agi://localhost:1234/hello.agi) To understand the poolSize property you need to know that the DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. The poolSize determines how many threads are spawned at startup and thus limits the number of AgiScripts that can run at the same time. So you should set the poolSize to at least the number of concurrent calls the AgiServer should be able to handle. The default value is 10. These configuration properties can be set by providing a fastagi.properties file on the classpath. This might look like: bindPort = 1234 poolSize = 20 =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Brett S. <bs...@no...> - 2006-06-01 07:02:30
|
This sounds like a problem to me. I would prefer the pool size to be a lower limit on the number of concurrent threads not an effective upper limit. Given we are talking about time sensitive processing I don't think that it would be generally consider acceptable to wait for a thread to become available. Given a large server is only like to have say 250 active channels allowing the number of concurrent threads to grow to 250 isn't really an issue. I would vote to have this changed. Stefan Reuter wrote: > Chris Howard wrote: > >> If I'm not mistaken there is a setting for the default thread pool size. >> Bump that up if you have more concurrent agi connection. Ah....here it >> is: >> >> private static final int DEFAULT_POOL_SIZE = 10 >> > > right. though there is no need to change the sources. From the tutorial: > > Configuration > > You can tune the DefaultAgiServer by setting two properties: The > bindPort and the poolSize. > > The bindPort determines the TCP port the server will listen on. By > default this is the FastAGI port 4573. If you change it make sure to > include the new port in the URLs used in extensions.conf. When using > bindPort 1234 your extensions.conf will contain: > > exten => 1300,1,Agi(agi://localhost:1234/hello.agi) > > To understand the poolSize property you need to know that the > DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. > The poolSize determines how many threads are spawned at startup and thus > limits the number of AgiScripts that can run at the same time. So you > should set the poolSize to at least the number of concurrent calls the > AgiServer should be able to handle. The default value is 10. > > These configuration properties can be set by providing a > fastagi.properties file on the classpath. > > This might look like: > > bindPort = 1234 > poolSize = 20 > > =Stefan > > |
From: Thameem A. <tha...@ya...> - 2006-06-01 08:20:04
|
Hi, In my application there are 100+ concurrent calls and I had only 50 pool size. They worked fine but twice a day it crashes..then i increased the threads to 250 and now no issues. The server load also not that high. -Thameem Brett Sutton <bs...@no...> wrote: This sounds like a problem to me. I would prefer the pool size to be a lower limit on the number of concurrent threads not an effective upper limit. Given we are talking about time sensitive processing I don't think that it would be generally consider acceptable to wait for a thread to become available. Given a large server is only like to have say 250 active channels allowing the number of concurrent threads to grow to 250 isn't really an issue. I would vote to have this changed. Stefan Reuter wrote: Chris Howard wrote: If I'm not mistaken there is a setting for the default thread pool size. Bump that up if you have more concurrent agi connection. Ah....here it is: private static final int DEFAULT_POOL_SIZE = 10 right. though there is no need to change the sources. From the tutorial: Configuration You can tune the DefaultAgiServer by setting two properties: The bindPort and the poolSize. The bindPort determines the TCP port the server will listen on. By default this is the FastAGI port 4573. If you change it make sure to include the new port in the URLs used in extensions.conf. When using bindPort 1234 your extensions.conf will contain: exten => 1300,1,Agi(agi://localhost:1234/hello.agi) To understand the poolSize property you need to know that the DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. The poolSize determines how many threads are spawned at startup and thus limits the number of AgiScripts that can run at the same time. So you should set the poolSize to at least the number of concurrent calls the AgiServer should be able to handle. The default value is 10. These configuration properties can be set by providing a fastagi.properties file on the classpath. This might look like: bindPort = 1234 poolSize = 20 =Stefan _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. |
From: Stefan R. <sr...@re...> - 2006-06-01 08:42:58
Attachments:
signature.asc
|
Brett Sutton wrote: > I would vote to have this changed. in 0.3 we have poolSize: number of worker threads in the thread pool. This is the number of threads that are available even if they are idle. maximumPoolSize: maximum number of worker threads in the thread pool. This equals the maximum number of concurrent requests this AgiServer can serve. Is this what you are looking for? =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |