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.

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

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

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

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

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

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

Stefano


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

Reply via email to