Hi, We are running Postgresql 8.2.4 + Resin Pro 3.0.23 + Apache 2.0.52 on Red Hat Enterprise Linux AS release 4 (Nahant Update 5) to serve about 40 virtual dynamic web sites. Apache works in prefork MPM mode.
We have some trouble about HTTP 503 error between Resin Pro and Apache, that we have hopefully solved but we are not sure... Facts ------ 1. First, we applied all hits about performance & keepalive that were present on page http://www.caucho.com/resin-3.0/config/tuning.xtp, but the problem didn't go away. In particular, we tried the following suggested values: ... <thread-pool> <thread-max>250</thread-max> </thread-pool> <server> <keepalive-max>250</keepalive-max> <keepalive-timeout>120s</keepalive-timeout> <cluster> <client-live-time>120s</client-live-time> <srun id="a" port="6802" read-timeout="120s"/> </cluster> </server> ... We noted that a lot of sockets (a large number!) between apache and resin went to TIME_WAIT state after a very short period of time and 503 Error still remains. 2. Then, we decided to try to tune these values and, after some trials, we found that the following setting is better and nearly totally reduces WAIT_TIME sockets and solves the 503 Error in all our tests: ... <thread-pool> <thread-max>512</thread-max> <spare-thread-min>35</spare-thread-min> </thread-pool> <server> <keepalive-max>512</keepalive-max> <keepalive-timeout>200s</keepalive-timeout> <cluster> <client-live-time>180s</client-live-time> <client-dead-time>10s</client-dead-time> <client-read-timeout>60s</client-read-timeout> <srun server-id="a" host="127.0.0.1" port="6802" read-timeout="190s"/> </cluster> </server> ... 3. Now, we are not able to find a complete explanation about these parameter value relations and where to check their runtime values. Here our thoughts... *** NAME = OFFICIAL EXPLANATION NOTE *** *** <client-live-time> = How long to keep an idle socket open. Is the time that a socket <srun>--httpd can be idle before it is closed? This time is known and used by the httpd socket side. Its value has to be less than keepalive-timeout, but how much? Its runtime value can be checked in /caucho-status page (Live time field of each virtual host connection table). The /caucho-status of our server sometimes reports connection tables about virtual hosts that don't exists such as www.federalism.ch:80, www.megaupload.com:80, etc... These tables are empty... but we don't understand their meaning or the error implied by their presence. *** *** <keepalive-timeout> = The maximum time a connection is maintained in the keepalive state. We believe that it is the time that a thread <srun> can be idle (waiting a httpd/apache request) before to be killed. If we are wrong, which is the difference between keepalive-timeout and client-live-time? It's better to set this value greater than client-live-time, but how much? Where does its runtime value can be checked? In /resin-status we haven't found anything about this parameter. We believe that the TCP ports table in resin-status reports a wrong threads total number and we don't understand the meaning of select field of the same table. *** *** <srun read-timeout> = timeout waiting to read from idle client. Which is the relation between this parameter and <client-live-time>? The http://www.caucho.com/resin-3.0/config/tuning.xtp authors suggest to set it greater than <client-live-time> even if they don't do it in the example, but how much? Where does its runtime value can be checked? *** Would appreciate any comments on these notes... Ciao, Roberto _______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest