19
mampf
6y

Java dev here. I rewrote an app and replaced a system call to ssh with a modern jaxrs post for uploading a file and (new) some additional data.
I even used a stream.

1 hour in production, first client doesn't get his file. Log says OutOfMemoryError: heap.

Me: wtf? I already use streams.
Looking at the Jersey library. Docs say nothing. An issue from 2013 says: oh if you silly don't use the Apache httpclient addon, we disable chunking and buffer the whole body, because our tests fail with the jdk included http client otherwise.

Me: meh.

No warning in the logs. Thank you soooooo much! Who could have known?

Comments
  • 2
    If you don‘t test, it‘s your fault.
    But shit happens and take it easy.
  • 1
    @dschenk our test environment does not have such large files and I cannot access it to create one. I set the log now to trace for jersey and httpclient, but it doesn't say which mode it uses. It's a bit frustrating.
  • 0
    @mampf I can understand that. I‘m developing a B2B webshopsystem and there is a function for downloading all article from a shop in a pdf. Do I have to say something about that? :D
    One of our customer has 14 million article ...
  • 0
    @dschenk yeah, that's ugly, too. I'd cache that somewhere. Maybe even created by another process?
Add Comment