Raman Kharche
06/02/2022, 5:53 AMio.lakefs.clients.api.ApiException: java.net.SocketTimeoutException: timeout
And in lakefs server logs are:
DEBUG [2022-06-02T11:11:59+05:30]lakeFS/pkg/httputil/logging.go:78 pkg/httputil.DebugLoggingMiddleware.func1.1 HTTP call ended host="localhost:8000" method=POST path="/api/v1/repositories/btest/branches/68873464/objects?path=containerd.gz&storageClass=" request_id=4f5fdba2-5fa1-436f-aa64-d0003ca6146a sent_bytes=31 service_name=rest_api status_code=500 took=1m30.3184134s
Do I need to increase the timeout? OkHttpClient default value is 10 second?Tal Sofer
06/02/2022, 6:07 AMThe Number of Threads(Users) 10 it works fine. When increased to 20Can you please share what number did you change and how? also, if you can share what you are trying to do that would be great.
Raman Kharche
06/02/2022, 6:11 AMRaman Kharche
06/02/2022, 6:13 AMRaman Kharche
06/02/2022, 6:14 AMTal Sofer
06/02/2022, 6:55 AMRaman Kharche
06/02/2022, 6:58 AMblockstore
is local
• One API I have written in JAVA which calls upload API + Commit API via Java Client of lakeFSTal Sofer
06/02/2022, 7:35 AMRaman Kharche
06/02/2022, 7:36 AMTal Sofer
06/02/2022, 7:51 AMTal Sofer
06/02/2022, 7:53 AMRaman Kharche
06/02/2022, 8:37 AMTal Sofer
06/02/2022, 9:16 AMTal Sofer
06/02/2022, 9:17 AMRaman Kharche
06/02/2022, 9:48 AMmain
• User is uploading 1 file (~45MB) in his branch only.
For example Let say branch name is user1
uploading file and committing it in user1
branch
So as soon as it will uploaded I have called commit apiTal Sofer
06/02/2022, 9:55 AMRaman Kharche
06/02/2022, 9:57 AMuser1
), directly commit it his branchTal Sofer
06/02/2022, 9:58 AMTal Sofer
06/02/2022, 9:59 AMRaman Kharche
06/02/2022, 10:00 AMmain
. So basically when user will upload a file it will create one Uncommitted Changes
Right. So I'm just committing this change in the user's branch. Not in main
branchTal Sofer
06/02/2022, 10:04 AMTal Sofer
06/02/2022, 10:05 AMRaman Kharche
06/02/2022, 10:10 AMall is well
then user will merge his branch to main
Tal Sofer
06/02/2022, 10:36 AMRaman Kharche
06/02/2022, 10:40 AMuploadObjectAsync
. (in onSuccess I am hitting commit api)Tal Sofer
06/02/2022, 10:44 AMRaman Kharche
06/02/2022, 10:47 AMTal Sofer
06/02/2022, 2:06 PMRaman Kharche
06/02/2022, 3:39 PMRaman Kharche
06/02/2022, 3:39 PMobjectsApi.uploadObjectAsync(repoName, branchName, path, "", "*", content, new ApiCallback<ObjectStats>() {
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
}
@SneakyThrows
@Override
public void onSuccess(ObjectStats result, int statusCode, Map<String, List<String>> responseHeaders) {
CommitsApi commitsApi = new CommitsApi(lakeFsClient.createLakeFsClient());
CommitCreation commitCreation = new CommitCreation();
commitCreation.setMessage("upload: " + fileUploadRequest.getCommitMessage());
commitCreation.setDate(System.currentTimeMillis());
commitCreation.setMetadata(new HashMap<>());
commitsApi.commit(repoName, branchName, commitCreation, null);
}
@Override
public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
}
@Override
public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
}
});
Tal Sofer
06/02/2022, 3:56 PMRaman Kharche
06/02/2022, 3:59 PMown
branch. Not in main
branchTal Sofer
06/02/2022, 4:00 PM