Re: [Asterisk-java-users] AGI script problem
Brought to you by:
srt
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 > > |