Stefano,

Thank You

Dima


Thursday, October 18, 2007, 1:07:11 PM, you wrote:

SB> Dima Retov ha scritto:
>> Thank you.
>> 
>> Actually I had 150 threads and now I have 54.
>> (I have decreased max-connections from 10 to 3)
>> 
>> I have min-threads 1 and spare threads 2.
>> (I think this must decrease allocated threads to 1 thread when they
>> are not used)
>> 
>> RemoteDelivery and remotemaneger were already set 1 thread.
>> 
>> I have smtp, smtps and pop3s services.
>> I am the only user who uses smtps and pop3s. So I guess it must
>> allocate 1 thread per smtps and pop3s if I do not read or sent emails
>> for some time.

SB> Unfortunately this is not how things works in JAMES. Threads pool are
SB> fully allocated to the max and never released. They instead will wait
SB> for some notification but they won't be deallocated.
SB> The min-thread and the spare configuration IIRC are ignored.

SB> If you want to know exactly what are the 54 threads you have in memory I
SB> suggest to ask a stacktrace (jstack <pid> or KILL -3 <pid> and look in
SB> the console). The name of each thread or the first lines of each stack
SB> should be useful to understand what each thread is and what is doing.

SB> If you want smtps, pop3s and remote manager to use less connections than
SB> smtp then you'll have to tweak the configuration a bit more:

SB> 1) Add a new connection manager block in the assembly.xml file:
SB> <!-- My tiny Connection Manager block -->
SB> <block name="altconnections"
SB> class="org.apache.james.util.connection.SimpleConnectionManager" >
SB> <provide name="thread-manager"
SB> role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
SB> </block>

SB> 2) Add a new <altconnections> configuration in your config.xml:
SB> <altconnections>
SB>   <idle-timeout>30000</idle-timeout>
SB>   <max-connections>1</max-connections>
SB> </altconnections>

SB> 3) Bind your smtps and pop3s services to the altconnection in your
SB> assembly.xml:
SB> <block name="smtps (or whatever you named it)"
SB> class="org.apache.james.smtpserver.SMTPServer">
SB> <provide name="altconnections"
SB> role="org.apache.james.services.JamesConnectionManager"/>
SB> </block>

SB> Stefano


SB> ---------------------------------------------------------------------
SB> To unsubscribe, e-mail: [EMAIL PROTECTED]
SB> For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Best regards,
 Dima                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to