Substream Source has not been materialized in 5000 milliseconds


(Puperze) #1

I am constantly getting this error when uploading files (Play 2.6.11):
SubscriptionTimeoutException: Substream Source has not been materialized in 5000 milliseconds

When I restart the application it works for some time and then I start getting this error again.

What could be the reason for this behaviour?


(Marcos Pereira) #2

Hi @Karl, could you please share the code for the upload?

Also, do you mind checking if the problem happens with the latest (2.6.16) version of Play?

Best.


(Puperze) #3
Form<UploadForm> form = formFactory.form(UploadForm.class).bindFromRequest();
Http.MultipartFormData.FilePart<File> filePart = request().body().<File>asMultipartFormData().getFile("file");
process(filePart.getFile());
flash(Application.Flash.Success, "message.upload.success");
return redirect(routes.Uploads.index());

It only happens on the production system. Therefore I can not test it with Play 2.6.16 right now.
When I stop the server, I get a lot of logs for removing leftover temporary files. Like it was not able to cleanup itself while running.

2018-07-19 10:50:05,021 [DEBUG] play.api.libs.Files$DefaultTemporaryFileCreator - stopHook: Removing leftover temporary file /opt/data/tmp/frontend/playtemp4437391101067552754/multipartBody3209463349584438720asTemporaryFile from /opt/date/tmp/frontend/playtemp4437391101067552754

(Puperze) #4

Maybe I should enable the TemporaryFileReaper?


(Puperze) #5

I still need some help.


(Marcos Pereira) #6

Did you tried to use the file reaper? I don’t think it is related to the problem you are seeing. Could you post the complete stack trace for the error?

Best.