Number of server threads Apache Tomcat Proxy problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Number of server threads Apache Tomcat Proxy problem

masionas
Hi Guys,

We face occasionally situation when ofbiz tomcat stops responding to apache httpd requests and it is all ends up with "503 server temporarily unavailable". Some research gave us hint that it can be coupled that tomcat is running out of available threads in the pool while apache http keeps sending requests. So our guess it is the problem in config of the threads number figure. The question is what would be correct numbers in such setup.

Apache httpd

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>


Tomcat is default numbers from ofbiz-containers.xml

 <property name="address" value="0.0.0.0"/>
            <property name="backlog" value="10"/>
            <property name="maxSpareThreads" value="50"/>
            <property name="maxThreads" value="200"/>
            <property name="minSpareThreads" value="4"/>
            <property name="port" value="8009"/>
            <property name="tcpNoDelay" value="true"/>
            <property name="soTimeout" value="60000"/>
            <property name="tomcatAuthentication" value="true"/>

If someone ran in this sort of config issues please advice. Thank you. Any ideas are appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

masionas
These are types of errors we are getting when this happens.

[error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[error] (104)Connection reset by peer: ajp_ilink_receive() can't receive header
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

Sanjeev Gupta
In reply to this post by masionas
Just try and increase maxThreads value of your AJP container setting to 256 so it matches MaxClients limit on your HTTPD.

Rgds
Sanjeev
Rgds
Sanjeev Gupta
www.digitalwebadvisors.com
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

Deepak Agarwal-2
We also experienced the same problem a lot of time. For us it was shopping
list , somehow whenever auto list delete service runs ofbiz start running
out of resources quickly.

On Mon, Dec 3, 2012 at 7:00 PM, Sanjeev Gupta <[hidden email]>wrote:

> Just try and increase maxThreads value of your AJP container setting to 256
> so it matches MaxClients limit on your HTTPD.
>
> Rgds
> Sanjeev
>
>
>
> -----
> Rgds
> Sanjeev
> www.sanjeevg.com
> @sanjeevgcom
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Number-of-server-threads-Apache-Tomcat-Proxy-problem-tp4638026p4638032.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>



--
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

Mike Z
Can you share your solution?  Thanks.

On Mon, Dec 3, 2012 at 9:19 PM, Deepak Agarwal <[hidden email]> wrote:

> We also experienced the same problem a lot of time. For us it was shopping
> list , somehow whenever auto list delete service runs ofbiz start running
> out of resources quickly.
>
> On Mon, Dec 3, 2012 at 7:00 PM, Sanjeev Gupta <[hidden email]
> >wrote:
>
> > Just try and increase maxThreads value of your AJP container setting to
> 256
> > so it matches MaxClients limit on your HTTPD.
> >
> > Rgds
> > Sanjeev
> >
> >
> >
> > -----
> > Rgds
> > Sanjeev
> > www.sanjeevg.com
> > @sanjeevgcom
> > --
> > View this message in context:
> >
> http://ofbiz.135035.n4.nabble.com/Number-of-server-threads-Apache-Tomcat-Proxy-problem-tp4638026p4638032.html
> > Sent from the OFBiz - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> Thanks,
> Deepak Agarwal,
>
> Mobile: +91 9501190044
>
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

Deepak Agarwal-2
As a temporary solution we deleted the shopping_list and shopping_list_item
where party_id is null . And set the recurrence of this job to 1st of every
month (instead of midnight daily)

On Tue, Dec 4, 2012 at 10:49 PM, Mike <[hidden email]> wrote:

> Can you share your solution?  Thanks.
>
> On Mon, Dec 3, 2012 at 9:19 PM, Deepak Agarwal <[hidden email]>
> wrote:
>
> > We also experienced the same problem a lot of time. For us it was
> shopping
> > list , somehow whenever auto list delete service runs ofbiz start running
> > out of resources quickly.
> >
> > On Mon, Dec 3, 2012 at 7:00 PM, Sanjeev Gupta <[hidden email]
> > >wrote:
> >
> > > Just try and increase maxThreads value of your AJP container setting to
> > 256
> > > so it matches MaxClients limit on your HTTPD.
> > >
> > > Rgds
> > > Sanjeev
> > >
> > >
> > >
> > > -----
> > > Rgds
> > > Sanjeev
> > > www.sanjeevg.com
> > > @sanjeevgcom
> > > --
> > > View this message in context:
> > >
> >
> http://ofbiz.135035.n4.nabble.com/Number-of-server-threads-Apache-Tomcat-Proxy-problem-tp4638026p4638032.html
> > > Sent from the OFBiz - User mailing list archive at Nabble.com.
> > >
> >
> >
> >
> > --
> > Thanks,
> > Deepak Agarwal,
> >
> > Mobile: +91 9501190044
> >
>



--
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

masionas
Hey,

Just writing to bump the thing up, if any one has other ideas? We still have this problem from time to time.
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

Jacques Le Roux
Administrator
Which Release.revision?

Jacques

From: "masionas" <[hidden email]>

> Hey,
>
> Just writing to bump the thing up, if any one has other ideas? We still have
> this problem from time to time.
>
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Number-of-server-threads-Apache-Tomcat-Proxy-problem-tp4638026p4638343.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Number of server threads Apache Tomcat Proxy problem

masionas
Version based on trunk dated January 2012