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

PUT request to /api/v1/bookmarks/cache takes too long #918

Open
DesarrolloAntonio opened this issue May 21, 2024 · 2 comments
Open

PUT request to /api/v1/bookmarks/cache takes too long #918

DesarrolloAntonio opened this issue May 21, 2024 · 2 comments
Labels
type:bug Something isn't working

Comments

@DesarrolloAntonio
Copy link

Data

  • Shiori version: 1.6.3

Describe the bug / actual behavior

I have an Android app that interacts with Shiori's API. When I attempt to update a bookmark archive, the request takes an excessively long time, often several minutes when is a large bookmark.

Endpoint:
PUT http:https://192.168.1.68:18080/api/v1/bookmarks/cache

{
   "create_archive": true,
   "create_ebook": true,
   "ids": [37],
   "keep_metadata": true,
   "skip_exist": false
}

Initially, the timeout in android app was set to 30 seconds. I increased it to 50 seconds, but there are still bookmarks that I cannot update because the request times out.

It seems that the timeout issue is related to the length of the bookmark. Here is an example of large bookmark that causes this issue.
large bookmark

Expected behavior

The server should return the bookmark information promptly while creating the archive in the background.

To Reproduce

Steps to reproduce the behavior:

  1. Add large bookmark
  2. Update archive
@DesarrolloAntonio DesarrolloAntonio added the type:bug Something isn't working label May 21, 2024
@fmartingr
Copy link
Member

Yeah, currently the data download task is a sync process. We could just launch this in background but right now we don't have means of telling the user what's the status of a background job. I'm currently working in something for that but is far from ready and it have other implications due to the nature of the bookmarks being available to all users at the moment.

@fmartingr
Copy link
Member

Reopening for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

2 participants