You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Paul Mokbel (JIRA)" <ji...@apache.org> on 2008/08/19 17:33:44 UTC

[jira] Created: (SOLR-709) solrj (CommonsHttpSolrServer) in production caught frozen forever

solrj (CommonsHttpSolrServer) in production caught frozen forever
-----------------------------------------------------------------

                 Key: SOLR-709
                 URL: https://issues.apache.org/jira/browse/SOLR-709
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 1.3
         Environment: solrj 1.3 i beleive latest snapshot
            Reporter: Paul Mokbel
            Priority: Blocker



I know for a fact that CommonsHttpSolrServer::setConnectionTimeout() works because I've tested it in the past but yesterday night my "SolrUpdateThread" stopped processing its queue.

Luckily I was able to JConsole into the running process and check the state of the thread. It was blocked with the following trace:

java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read(BufferedInputStream.java:237)
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:303)
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:155)
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:220)
org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:102)
org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:91)

It had been blocking for a few hours when i found it this way, and I initiate CommonsHttpSolrServer::setConnectionTimeout(2000); at startup ! The software using this is getting ready to go into production environment so this is real scary for me.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-709) solrj (CommonsHttpSolrServer) in production caught frozen forever

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623701#action_12623701 ] 

Yonik Seeley commented on SOLR-709:
-----------------------------------

setConnectionTimeout only affects how long the client waits for a connection.
In this case, a connection has been made and the client is waiting for a response.

What does a thread dump on the Solr server show?


> solrj (CommonsHttpSolrServer) in production caught frozen forever
> -----------------------------------------------------------------
>
>                 Key: SOLR-709
>                 URL: https://issues.apache.org/jira/browse/SOLR-709
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.3
>         Environment: solrj 1.3 i beleive latest snapshot
>            Reporter: Paul Mokbel
>            Priority: Blocker
>
> I know for a fact that CommonsHttpSolrServer::setConnectionTimeout() works because I've tested it in the past but yesterday night my "SolrUpdateThread" stopped processing its queue.
> Luckily I was able to JConsole into the running process and check the state of the thread. It was blocked with the following trace:
> java.net.SocketInputStream.socketRead0(Native Method)
> java.net.SocketInputStream.read(SocketInputStream.java:129)
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> java.io.BufferedInputStream.read(BufferedInputStream.java:237)
> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:303)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:155)
> org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:220)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:102)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:91)
> It had been blocking for a few hours when i found it this way, and I initiate CommonsHttpSolrServer::setConnectionTimeout(2000); at startup ! The software using this is getting ready to go into production environment so this is real scary for me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SOLR-709) solrj (CommonsHttpSolrServer) in production caught frozen forever

Posted by "Paul Mokbel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Mokbel closed SOLR-709.
----------------------------

    Resolution: Invalid

Assuming setSoTimeout will fix this, I am closing this. I incorrectly assumed that setConnectionTimeout originally also applied to actions after the socket was established.  

> solrj (CommonsHttpSolrServer) in production caught frozen forever
> -----------------------------------------------------------------
>
>                 Key: SOLR-709
>                 URL: https://issues.apache.org/jira/browse/SOLR-709
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.3
>         Environment: solrj 1.3 i beleive latest snapshot
>            Reporter: Paul Mokbel
>            Priority: Blocker
>
> I know for a fact that CommonsHttpSolrServer::setConnectionTimeout() works because I've tested it in the past but yesterday night my "SolrUpdateThread" stopped processing its queue.
> Luckily I was able to JConsole into the running process and check the state of the thread. It was blocked with the following trace:
> java.net.SocketInputStream.socketRead0(Native Method)
> java.net.SocketInputStream.read(SocketInputStream.java:129)
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> java.io.BufferedInputStream.read(BufferedInputStream.java:237)
> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:303)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:155)
> org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:220)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:102)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:91)
> It had been blocking for a few hours when i found it this way, and I initiate CommonsHttpSolrServer::setConnectionTimeout(2000); at startup ! The software using this is getting ready to go into production environment so this is real scary for me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-709) solrj (CommonsHttpSolrServer) in production caught frozen forever

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623719#action_12623719 ] 

Shalin Shekhar Mangar commented on SOLR-709:
--------------------------------------------

You probably need to use the setSoTimeout method

> solrj (CommonsHttpSolrServer) in production caught frozen forever
> -----------------------------------------------------------------
>
>                 Key: SOLR-709
>                 URL: https://issues.apache.org/jira/browse/SOLR-709
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.3
>         Environment: solrj 1.3 i beleive latest snapshot
>            Reporter: Paul Mokbel
>            Priority: Blocker
>
> I know for a fact that CommonsHttpSolrServer::setConnectionTimeout() works because I've tested it in the past but yesterday night my "SolrUpdateThread" stopped processing its queue.
> Luckily I was able to JConsole into the running process and check the state of the thread. It was blocked with the following trace:
> java.net.SocketInputStream.socketRead0(Native Method)
> java.net.SocketInputStream.read(SocketInputStream.java:129)
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> java.io.BufferedInputStream.read(BufferedInputStream.java:237)
> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:303)
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:155)
> org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:220)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:102)
> org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:91)
> It had been blocking for a few hours when i found it this way, and I initiate CommonsHttpSolrServer::setConnectionTimeout(2000); at startup ! The software using this is getting ready to go into production environment so this is real scary for me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.