[ https://issues.apache.org/jira/browse/JENA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172596#comment-13172596 ]
Rob Vesse commented on JENA-181: -------------------------------- Hmm, looks like I made a dumb error, there is no close() call on the query executor in my test code which causes it to be left open until such time as it gets GCd on the client. Looks like the server has no way of telling that a client has finished with the connection and so doesn't free it up without that explicit close() call. The fact that this only happens for SELECT queries when close() is not called suggests to me that only SELECT results get parsed in a streaming fashion. Looking at XMLInputStAX and XMLInputSAX it looks like it might be possible to automatically call close() on the source QueryExecution at the point where no further results are found? There would need to be some refactoring to allow an optional QueryExecution to be passed in upon which you'd call close() at the appropriate juncture but would this be a patch you guys would be willing to incorporate? > Fuseki starts producing 500 errors if rapidly sent a sequence of queries > ------------------------------------------------------------------------ > > Key: JENA-181 > URL: https://issues.apache.org/jira/browse/JENA-181 > Project: Jena > Issue Type: Bug > Components: Fuseki > Affects Versions: Fuseki 0.2.1 > Environment: Mac OS X Lion > Reporter: Rob Vesse > Attachments: FusekiDOSAttack.java > > > It is fairly trivial to cause Fuseki to start generating a 500 : Direct > buffer memory error code in response to queries simply by sending a sequence > of queries to it with no delays between them, even with a short delay e.g. > 0.5 seconds Fuseki will typically get into this state at a similar point. > Attached is a simple test case which fires SELECT * WHERE { } queries at a > local Fuseki instance, for me this reliably fails on the 25th iteration, > turning on --debug and --verbose for Fuseki and modifying the > log4j.properties file to set DEBUG level for everything didn't show anything > particularly useful on the command line so I have no idea what the cause of > this may be beyond something related to java.nio.HeapByteBuffer -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira