Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004251 [Resin] minor always 10-07-10 16:03 11-02-10 15:09
Reporter emil View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.13 Product Version 4.0.10
  Product Build
Summary 0004251: <thread-max> not picked up from configuration
Description (rep by snw via forums)

I am posting here first rather than filing a bug report straight away in case this is user error.

Resin 4.0.10 looks like it doesn't action the thread-max element in config files. This is causing Resin to eventually run out of memory after spawning too many threads (my worst case scenario has each http request trigger a database call that takes about an 30 minutes to complete). My config file is this basic.conf:

<resin xmlns="http://caucho.com/ns/resin" [^]
xmlns:resin="urn:java:com.caucho.resin">

<cluster-default>
<resin:import path="${__DIR__}/app-default.xml"/>
<server-default>
<thread-max>50</thread-max>
<thread-idle-min>10</thread-idle-min>
<thread-idle-max>20</thread-idle-max>
</server-default>
</cluster-default>

<cluster id="">
<server id="">
<thread-max>50</thread-max>
<thread-idle-min>10</thread-idle-min>
<thread-idle-max>20</thread-idle-max>
<http port="8080"/>
</server>

<host id="" root-directory=".">
<web-app id="/" root-directory="/tmp/test"/>
</host>
</cluster>
</resin>

So, pretty clear that max thread pool size should be 50 right? Or have I misunderstood the configuration options?

I have two test scripts in /tmp/test, status.jsp to print the number of threads in the pool / total threads allowed, and threads.jsp to change the thread pool max size programmatically.

status.jsp:
<H1> Thread Max: </H1>
<%=
com.caucho.env.thread.ThreadPool.getThreadPool().g etThreadCount()
%>/
<%=
com.caucho.env.thread.ThreadPool.getThreadPool().g etThreadMax()
%>

threads.jsp:
<H1> Thread Max: </H1>
<%
com.caucho.env.thread.ThreadPool.getThreadPool().s etThreadMax(128);
%>
<%=
com.caucho.env.thread.ThreadPool.getThreadPool().g etThreadCount()
%>/
<%=
com.caucho.env.thread.ThreadPool.getThreadPool().g etThreadMax()
%>

Running http://127.0.0.1:8080/status.jsp [^] I get: Thread Max: 15/ 4096

Running http://127.0.0.1:8080/threads.jsp [^] I get: Thread Max: 15/ 128

So, it started up with the wrong amount, but I was able to set it to a different amount later. The thread pool max directive in Resin 3.1.9 works fine for me. So - is this a bug in 4.0.10 and should I file it in the tracker, or is this a user error?
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0004810)
ferg
11-02-10 15:09

server/4500
 

- Issue History
Date Modified Username Field Change
10-07-10 16:03 emil New Issue
11-02-10 15:09 ferg Note Added: 0004810
11-02-10 15:09 ferg Assigned To  => ferg
11-02-10 15:09 ferg Status new => closed
11-02-10 15:09 ferg Resolution open => fixed
11-02-10 15:09 ferg Fixed in Version  => 4.0.13


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker