Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upload large number of subjects because of token expiration #40

Closed
Tracked by #1545 ...
himeshr opened this issue May 22, 2024 · 2 comments
Closed
Tracked by #1545 ...
Assignees

Comments

@himeshr
Copy link
Contributor

himeshr commented May 22, 2024

env: prod
username: sachink@cini_uat

Issue:

  • On csv uploading of large number of subjects, we are facing repeated 401 errors during upload of Subjects.
  • Once these fail, with TokenExpiredException for a row, all consecutive rows also repeatedly fail with the same error, as token is not refreshed intermediately.
  • Uploads need to be done in 1000s and hence smaller size uploads is not easier to do

Technical details:

In rules-server, we make use of "upload-user" username and its password in getUploadUserToken(), to fetch token, that is to be used to invoke Avni APIs like "/upload" or "/upload/media", etc.. looks like some issue with token refreshing.

Refer attached file for error stack trace: ErrorStackTrace.txt
Link of the error file

@github-project-automation github-project-automation bot moved this to New Issues in Avni Product May 22, 2024
@mahalakshme mahalakshme moved this from New Issues to Ready in Avni Product May 22, 2024
@mahalakshme mahalakshme changed the title Unable to upload Subjects due to TokenExpiredException Unable to upload large number of subjects because of token expiration May 22, 2024
@1t5j0y 1t5j0y moved this from Ready to In Progress in Avni Product May 22, 2024
@1t5j0y 1t5j0y self-assigned this May 22, 2024
@1t5j0y
Copy link
Contributor

1t5j0y commented May 22, 2024

Issue is not with the token for upload-user on rules-server. That is getting set for each call.
Issue is with the token expiring for the user that triggered the upload job which is set in the request to rule server.

To unblock implementation team for now, have advised them to logout/login to webapp just before upload and chunk the upload into batches of 1000 subjects. The upload roughly taking 25 mins for 500 subjects.

Will need to discuss long term solution.

1t5j0y added a commit that referenced this issue May 23, 2024
@1t5j0y
Copy link
Contributor

1t5j0y commented May 23, 2024

Issue was that the token for the user who triggered the upload was being used for calls from rules-server back to avni-server to fetch rules (/rule/search) and ruledependencies (/ruleDependency/search) which would expire during upload.
Fixed to use token for upload-user for these calls as well.

@1t5j0y 1t5j0y moved this from In Progress to Code Review Ready in Avni Product May 23, 2024
@petmongrels petmongrels moved this from Code Review Ready to In Code Review in Avni Product May 23, 2024
@petmongrels petmongrels moved this from In Code Review to QA Ready in Avni Product May 23, 2024
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product May 23, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product May 23, 2024
@mahalakshme mahalakshme moved this from Done to In Analysis in Avni Product May 24, 2024
@vinayvenu vinayvenu reopened this May 24, 2024
@github-project-automation github-project-automation bot moved this from In Analysis to Triaged in Avni Product May 24, 2024
@mahalakshme mahalakshme moved this from Triaged to Done in Avni Product May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants