On 03/22/12 11:28, Vladimir Kotal wrote:

<snip>

That's very interesting. I've been observing the same problem (combined
with Tomcat/Java running out of heap space) just yesterday on our
internal server which has cca 250 projects so this is definitely an
issue. Some all-project queries were returning HTTP error code 400
straight, some ended up with success (200) but with the
'java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError:
Java heap space' error displayed in OpenGrok page (instead of results).

So, there are 2 different problems with big number of projects (>200) in single OpenGrok instance:
  1) the 400 HTTP error code appearing every so on
  2) Java running out of heap space

Both of them are related to capacity planning rather than bugs in OpenGrok itself (at least that's the current belief).

Dalibor Skrobak (Cc'ed) tracked the first one to Tomcat hitting the limit of HTTP headers length (with RefControl Firefox extension and playing with Referer content - basically making it bigger). The problem appeared when someone performed a search across all projects and then clicked on second/third/... page of the results. The Referer (which contained long URL with all projects listed) made the HTTP headers too long for Tomcat which as a result returned error 400. We fixed that problem by bumping the limit with maxHttpHeaderSize in server.xml:

 <Connector port="8888" protocol="HTTP/1.1"
               connectionTimeout="20000"
               maxHttpHeaderSize="65536"
               redirectPort="8443" />

For the second problem, Lubos Kosco went through the Java heap dump (obtained by setting JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/tomcat6/logs/dumps" and searching across all projects) in Eclipse mat and jhat and the conclusion was that this does not look like memory leak and Tomcat simply needed more heap space to complete the query. So, we bumped the memory (JAVA_OPTS="$JAVA_OPTS -Xmx3g" , see http://defect.opensolaris.org/bz/show_bug.cgi?id=19192 for equation which helps to compute the upper limit) and the all-project searches now complete just fine (albeit a bit slowly).


v.
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to