Hi all,

 

We've caught the following exception recently with the native Sedna Java
driver:

 

Caused by: ru.ispras.sedna.driver.DriverException: SEDNA Message: ERROR
SE5501

Result item cannot be returned as a String because it is too large.

        at
ru.ispras.sedna.driver.SednaSerializedResultImpl.next(SednaSerializedResultI
mpl.java:86)

 

I'm using the following method of SednaSerializedResultImpl:

    public int next(Writer writer) throws DriverException

 

The issue corresponds to OutOfMemoryError. After a quick check I've found
out the XQuery result is being saved to StringBuffer instance stringItem
first of all, then it's being written with the writer:
writer.write(this.stringItem.toString());

 

So the complete XML is stored in memory resulting in inefficient memory
usage here.

 

The question is if it's possible to use streaming here: open InputStream
from Sedna with the result of XQuery execution and then write the stream? I
have no idea if it's supported on Sedna side. Does anyone have knowledge
about it?

 

Best regards,

Ivan Lagunov

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to