Error uploading files

I'm trying to upload large files, it worked for me once and out of nowhere it stopped working on the server. I handle my exceptions and I don't see my custom messages, I'm also trying to see the error with logs and it doesn't show them to me, because this error only happens to me on the server, locally it works for me. I'm working with Java and uploading to amazon s3.
No description
22 Replies
Percy
Percy5mo ago
Project ID: N/A
JuanseGm
JuanseGm5mo ago
N/A
Brody
Brody5mo ago
you say you are uploading large files to s3, but where are these large files coming from because to me this error looks like an error from an unhandled exception of a large file being uploaded to your app since the error talks about reading, not writing
JuanseGm
JuanseGm5mo ago
The files come from my computer. The problem is that it gives me that error after exactly 5 minutes. Even so, it consumes server ram, network and cpu memory.
Brody
Brody5mo ago
right you didn't mention this was an error you get when uploading files to your app, so my assumption was dead on you said 5 minutes, railway has a max request time of 5 minutes, you would have to implement chunked uploads
JuanseGm
JuanseGm5mo ago
Could you give me an example of that please? Because I am partitioning the files for upload
Brody
Brody5mo ago
these help threads aren't really for coding help, but I'm sure there are a few server libraries for java that handle chunked uploads
JuanseGm
JuanseGm5mo ago
Ok, thank you very much anyway, that makes it clear to me that we have to do the uploading in another way
Brody
Brody5mo ago
though, depending on if your code needs to modify the uploaded files or not, you could return to the user a signed S3 url for the client to upload to still recommended to do chunked uploads for that too
JuanseGm
JuanseGm5mo ago
I just checked, and we are using chunked loads
Brody
Brody5mo ago
you'd need to split the chunks into small enough pieces so that no single chunk can take longer than 5 minutes to upload
JuanseGm
JuanseGm5mo ago
I don't know if it's time to convert the async method We have each part of the file at 5mb, with 10 threads
Brody
Brody5mo ago
some request to your app is taking longer than 5 minutes then
JuanseGm
JuanseGm5mo ago
If we make this asynchronous, could that help?
Brody
Brody5mo ago
as long as no single request takes 5 minutes, your problem is solved
JuanseGm
JuanseGm5mo ago
How can I read logs on the server?
Brody
Brody5mo ago
you've already shown me the logs? meaning you know how to read them?
JuanseGm
JuanseGm5mo ago
ye, show me locally but not on the server
Brody
Brody5mo ago
as long as you log unbuffered to stdout / stderr you will see the log in the deployments log window
JuanseGm
JuanseGm5mo ago
They should appear there but I don't see any sout that I have
Brody
Brody5mo ago
I'm sorry, I'm not a java developer, I can only tell you about your issues at a high level
JuanseGm
JuanseGm5mo ago
Ok, I'll check further with other coding tests