OCI Object Storage: scenarios Uploading Large Files with Java SDK - Unexpected EOF handling
I'm integrating two systems and I've looked through the documentation and I'm still confused about I'm experiencing issues when trying to upload large files (around 1GB) to OCI Object Storage using the Java SDK (version 2.13.0). I keep working with an `Unexpected EOF Exception` during the upload process. Here's a snippet of the code I'm using: ```java import com.oracle.bmc.objectstorage.ObjectStorageClient; import com.oracle.bmc.objectstorage.model.PutObjectRequest; import com.oracle.bmc.objectstorage.model.PutObjectResponse; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; public class UploadLargeFile { public static void main(String[] args) throws Exception { ObjectStorageClient client = new ObjectStorageClient(...); String namespace = "your_namespace"; String bucketName = "your_bucket_name"; String objectName = "large_file.dat"; File file = new File("path/to/large_file.dat"); try (InputStream inputStream = new FileInputStream(file)) { PutObjectRequest putObjectRequest = PutObjectRequest.builder() .namespaceName(namespace) .bucketName(bucketName) .objectName(objectName) .contentLength(file.length()) .build(); PutObjectResponse response = client.putObject(putObjectRequest, inputStream); System.out.println("Upload completed with response: " + response); } catch (Exception e) { e.printStackTrace(); // this prints Unexpected EOF Exception } finally { client.close(); } } } ``` I've confirmed that the file is not corrupted and can be uploaded using the OCI console without any issues. The behavior seems to occur consistently after around 30 seconds of upload time. I've also tried adjusting the timeout settings for the ObjectStorageClient, but it didn't help. Hereβs how I set the client: ```java ClientConfiguration config = ClientConfiguration.builder() .connectionTimeout(Duration.ofSeconds(10)) .readTimeout(Duration.ofSeconds(60)) .build(); ObjectStorageClient client = new ObjectStorageClient(config); ``` Can anyone provide insights on what might be going wrong or if there are specific configurations needed for uploading larger files? I'm looking for best practices or potential workarounds to resolve this unexpected EOF scenario. I'm working on a application that needs to handle this. I'm coming from a different tech stack and learning Java. Has anyone dealt with something similar?