Search server 408 Timeout error

Intermittently we are receiving 408 Timeout errors from Tomcat when running search queries. The errors seem to occur mostly after restarting Tomcat or initing the indexes after rebuilding and when running a query with a long URI. An example of a problem query is:

/ws/2/recording/?max=15&type=recording&fmt=jsonnew&offset=0&query=I%27m%20Going%20to%20the%20Country%20and%20Paint%20My%20Mailbox%20Blue%20and%20artist%3A"Taj%20Mahal%20the%20International%20Rhythm%20Band"%20and%20release%3AThe%20Rising%20Sun%20Collection&dismax=false

Sometimes running the query a few times in row kick starts things and the search server returns a real answer. Other times, the query doesn’t work until the Tomcat is restarted.

This server is not from the supplied VM. It is a hand built Ubuntu 16.04.2 server running Tomcat 7.0.68-1ubuntu0.1, MMD Schema da2307a, and search server ee60311. This problem happened with schema version 23 and continues with 24. The same server runs the Musicbrainz server, postgres, and search.

catalina.out just reports that the query timed out but seems to later log that the query finished. The Tomcat localhost (not access) log doesn’t seem to show anything relevant.

Does anyone know how to fix this? Would splitting the components onto their own servers make a difference?

Thanks.

Michael

I should add, I’ve already tried increasing the heap size for Tomcat and that doesn’t seem to have had any impact.

Michael

If queries are indeed timing out, then the resources available to tomcat may not be sufficient. What machine specs are you running all this on? If you are running everything on one box, 16GB ram and at least 4 cores are recommended.