We noticed that long documents can cause issues in the form of http errors (see #47 and #51).
One way to potentially avoid this - aside from splitting up the document - might be to switch the http method from GET to POST. This is suggested in the Wiki of DBpedia Spotlight: https://github.com/dbpedia-spotlight/dbpedia-spotlight/wiki/Web-service (at the very end of the page). There is also an example containing the appropriate content-type.