SolrException: Internal Server Error

前端 未结 5 726
小蘑菇
小蘑菇 2020-12-30 09:36

I am working on Solr in my application. I am using apache-solr-solrj-1.4.0.jar.

When I try to call add(SolrInputDocument doc) from Common

相关标签:
5条回答
  • 2020-12-30 10:14

    SolrJ client does not give you the actual error. Try looking at the solr server logs which should be located under tomcat or jetty (or whatever runs solr).

    0 讨论(0)
  • 2020-12-30 10:16

    Sounds like a corrupt index or busy lock file.. I had something similar and restarting worked, oddly enough.

    0 讨论(0)
  • 2020-12-30 10:21

    I have set following in my solrconfig.xml and it works.

    <lockType>simple</lockType>
    <unlockOnStartup>true</unlockOnStartup>
    

    Also, set following to avoid write lock exceptions on index directory:

    <maxFieldLength>10000</maxFieldLength>
    <writeLockTimeout>60000</writeLockTimeout>
    <commitLockTimeout>60000</commitLockTimeout>
    
    0 讨论(0)
  • 2020-12-30 10:25

    It comes from failing to remove write.lock file after some update actions. Removing the write.lock in the core's data/index folder will solve this problem temporarily and regain updating action. I know using post.jar to update has more bad luck to cause this problem, whereas url with stream.body rarely cause this problem. Karussel's answer did improves the situation but seems not solve it at all. I doubt it comes from some design issue of Solr. Hope Solr 4 has solved this problem. Also one can refer to the answer in this question: how-to-solve-the-lock-obtain-timed-out-when-using-solr-plainly

    0 讨论(0)
  • 2020-12-30 10:28

    I am very unsure, but in this thread

    http://www.mail-archive.com/solr-user@lucene.apache.org/msg08048.html

    they recommend to use

    <unlockOnStartup>true</unlockOnStartup>
    

    and

    <lockType>simple</lockType>
    

    I think this should be safe as long as you access the index through solr or solrj (not though lucene!).

    Any other ideas?

    0 讨论(0)
提交回复
热议问题