On 9/10/2013 2:37 PM, Brent Ryan wrote:
Does anyone know why solr is not respecting keep-alive requests when using
apache bench?
ab -v 4 -H "Connection: Keep-Alive" -H "Keep-Alive: 3000" -k -c 10 -n 100 "
http://host1:8983/solr/test.solr/select?q=*%3A*&wt=xml&indent=true"
Response contains this and if you look at debug output you see http header
of Connection: Close
Keep-Alive requests: 0
Any ideas? I'm seeing the same behavior when using http client.
This would be controlled by the webserver settings in whatever container
you are using to run Solr. If you have no idea what I'm talking about,
you're probably using the Jetty that comes in the Solr example
(start.jar). If you're using another container like Tomcat, then I
don't know how to help you at all.
I don't know whether Solr will work correctly on a connection with
keepalive. If the container can keep the requests separate, it probably
will.
Getting help with the container (even the included Jetty) is outside the
scope of this mailing list, but I did a little bit of research.
HTTP 1.0 has no official keepalive mechanism. Some implementations do
support it, but it's not part of the official specification.
I read something which said that Jetty will automatically handle
keepalive if you send it HTTP 1.1 connections. Apache Bench only does
HTTP 1.0, though.
Thanks,
Shawn