Just a few additions.
- I've updated the sample code to:
- show the problematic behaviour by default instead of the working one
- not require the Lombok library installed in Eclipse so that anybody
without lombok lib can use his own IDE
- When I say "the client either becomes stuck in executeUpdate() or
waits forever", I meant "the client either becomes stuck in executeUpdate()
or exits with connection reset".
On Wednesday, July 22, 2015 at 9:06:06 PM UTC+2, Francois Marot wrote:
>
> Hello all,
>
> I face a problem here with H2.
> This is reproducible on a few version from 2012 to the latest.
> When run *in server mode* and storing a large BLOB, the client either
> becomes stuck in executeUpdate() or waits forever. Depending on the content
> of the file being sent.
> It happens only with files nearing 2GB or larger.
> The problem does NOT happen in embedded mode.
>
> I have set up a sample project on github showcasing the problem:
> https://github.com/fmarot/h2tests
>
> Here is the part of my code but I doubt it will teach you anything:
>
> try (PreparedStatement pstmt =
> connection.prepareStatement("INSERT INTO FILES(OID, DATA,
> FILENAME) VALUES (" 1 + ", ?, '" + filename + "')");
> InputStream is = new BufferedInputStream(new
> FileInputStream(myLargeFile))) {
> pstmt.setBinaryStream(1, is);
> pstmt.executeUpdate(); // H2 is stuck here for large
> files (or exit with connection reset, depending on the content of the file)
> }
>
> Any idea or leads to debug myself are welcome!
>
> Wish you the best,
> Francois
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.