ElasticSearch web application too slow

Hello,
I have developed a small sample web application implementing the search
feature of elasticsearch. The index which is searched upon is only 60 kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any help in
this matter would be appreciated.

Thank you

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the search
feature of elasticsearch. The index which is searched upon is only 60 kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any help in
this matter would be appreciated.

Thank you

Well using a logger I figured out that the execution waits at the following
statement for 30 seconds

client.admin().cluster().prepareHealth().setWaitForYellowStatus()
.execute().actionGet();

Also it seems that this is because of the "setWaitForYellowStatus()". Any
suggestions on how to work on it now as in to avoid this wait of 30
seconds??

Thank you

On Mon, Jun 25, 2012 at 3:25 PM, jagdeep reach.jagdeep@gmail.com wrote:

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the search
feature of elasticsearch. The index which is searched upon is only 60 kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any help in
this matter would be appreciated.

Thank you

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Are you sure your client actually connects to the cluster? It probably
doesn't, thats why it doesn't get to the yellow status.

On Mon, Jun 25, 2012 at 12:57 PM, Harsh Chhatwani <harsh.chhatwani@gmail.com

wrote:

Well using a logger I figured out that the execution waits at the
following statement for 30 seconds

client.admin().cluster().prepareHealth().setWaitForYellowStatus()
.execute().actionGet();

Also it seems that this is because of the "setWaitForYellowStatus()". Any
suggestions on how to work on it now as in to avoid this wait of 30
seconds??

Thank you

On Mon, Jun 25, 2012 at 3:25 PM, jagdeep reach.jagdeep@gmail.com wrote:

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the search
feature of elasticsearch. The index which is searched upon is only 60
kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any help
in
this matter would be appreciated.

Thank you

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Well the problem is solved, I just changed the timeout value to 1 second
and it gives the result immediately, it was previously set to 30 seconds.

On Mon, Jun 25, 2012 at 5:23 PM, Shay Banon kimchy@gmail.com wrote:

Are you sure your client actually connects to the cluster? It probably
doesn't, thats why it doesn't get to the yellow status.

On Mon, Jun 25, 2012 at 12:57 PM, Harsh Chhatwani <
harsh.chhatwani@gmail.com> wrote:

Well using a logger I figured out that the execution waits at the
following statement for 30 seconds

client.admin().cluster().prepareHealth().setWaitForYellowStatus()
.execute().actionGet();

Also it seems that this is because of the "setWaitForYellowStatus()". Any
suggestions on how to work on it now as in to avoid this wait of 30
seconds??

Thank you

On Mon, Jun 25, 2012 at 3:25 PM, jagdeep reach.jagdeep@gmail.com wrote:

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the search
feature of elasticsearch. The index which is searched upon is only 60
kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any help
in
this matter would be appreciated.

Thank you

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Thats the wrong way to solve the problem, in general, you don't need to
check on each request for yellow status, the search response will include
what worked and what not. And if the cluster is not in yellow status,
something is wrong.

On Mon, Jun 25, 2012 at 2:21 PM, Harsh Chhatwani
harsh.chhatwani@gmail.comwrote:

Well the problem is solved, I just changed the timeout value to 1 second
and it gives the result immediately, it was previously set to 30 seconds.

On Mon, Jun 25, 2012 at 5:23 PM, Shay Banon kimchy@gmail.com wrote:

Are you sure your client actually connects to the cluster? It probably
doesn't, thats why it doesn't get to the yellow status.

On Mon, Jun 25, 2012 at 12:57 PM, Harsh Chhatwani <
harsh.chhatwani@gmail.com> wrote:

Well using a logger I figured out that the execution waits at the
following statement for 30 seconds

client.admin().cluster().prepareHealth().setWaitForYellowStatus()
.execute().actionGet();

Also it seems that this is because of the "setWaitForYellowStatus()".
Any suggestions on how to work on it now as in to avoid this wait of 30
seconds??

Thank you

On Mon, Jun 25, 2012 at 3:25 PM, jagdeep reach.jagdeep@gmail.comwrote:

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the
search
feature of elasticsearch. The index which is searched upon is only 60
kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any
help in
this matter would be appreciated.

Thank you

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Correct me if I am wrong. So you mean I should not change the time out
value right?
Well that will again lead to the application to wait for 30 seconds before
it can go further to the creation of queryBuilder object later followed by
search response.

How do you suggest to work on it?

Thank you

On Mon, Jun 25, 2012 at 6:13 PM, Shay Banon kimchy@gmail.com wrote:

Thats the wrong way to solve the problem, in general, you don't need to
check on each request for yellow status, the search response will include
what worked and what not. And if the cluster is not in yellow status,
something is wrong.

On Mon, Jun 25, 2012 at 2:21 PM, Harsh Chhatwani <
harsh.chhatwani@gmail.com> wrote:

Well the problem is solved, I just changed the timeout value to 1 second
and it gives the result immediately, it was previously set to 30 seconds.

On Mon, Jun 25, 2012 at 5:23 PM, Shay Banon kimchy@gmail.com wrote:

Are you sure your client actually connects to the cluster? It probably
doesn't, thats why it doesn't get to the yellow status.

On Mon, Jun 25, 2012 at 12:57 PM, Harsh Chhatwani <
harsh.chhatwani@gmail.com> wrote:

Well using a logger I figured out that the execution waits at the
following statement for 30 seconds

client.admin().cluster().prepareHealth().setWaitForYellowStatus()
.execute().actionGet();

Also it seems that this is because of the "setWaitForYellowStatus()".
Any suggestions on how to work on it now as in to avoid this wait of 30
seconds??

Thank you

On Mon, Jun 25, 2012 at 3:25 PM, jagdeep reach.jagdeep@gmail.comwrote:

Please post your configuration details and query.

On Jun 25, 2:14 pm, Harsh harsh.chhatw...@gmail.com wrote:

Hello,
I have developed a small sample web application implementing the
search
feature of elasticsearch. The index which is searched upon is only
60 kb.
When I run the application it takes 30 seconds to display the search
results. Can anyone suggest a way to improve the performance? Any
help in
this matter would be appreciated.

Thank you

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Hello,

I checked the logs and you're right, the client is unable to connect to the
cluster. Can you please suggest how to solve that?

Thankyou

Check your setup.
Curl to http://yournode:9200/ from your webapp server.

Check firewall rules on your nodes (9200-9299/9300-9399).

David :wink:
Twitter : @dadoonet / @elasticsearchfr

Le 26 juin 2012 à 08:35, Harsh Chhatwani harsh.chhatwani@gmail.com a écrit :

Hello,

I checked the logs and you're right, the client is unable to connect to the cluster. Can you please suggest how to solve that?

Thankyou