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

Slow job processing #107

Closed
Nas-77 opened this issue Jan 27, 2024 · 8 comments
Closed

Slow job processing #107

Nas-77 opened this issue Jan 27, 2024 · 8 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@Nas-77
Copy link

Nas-77 commented Jan 27, 2024

Hi, I noticed from the web app that tranga processes 2 jobs at most in parallel (1 downloading and another one that checks for new chapters). So I was wondering if there is any way to speed up the job processing or make more jobs run in parallel? I think this will become a bottleneck when it is monitoring a few hundred mangas. Thanks

@C9Glax
Copy link
Owner

C9Glax commented Jan 27, 2024

Hello.
This is intended behaviour. API-Request-Limits as well as firewalls will block without second thought which is why tranga tries to respect others as much as possible.
If someone starts requesting 10 pages a second the useragent will be blocked as well so being patient is part of the game. I have 130 Manga monitored, and the delay between requests per connector is around 1 second. That means I can check all Manga for updates in 2 Minutes, download new chapters (most often 2-5 á 30 pages) in another 2-3 Minutes.
While it is a bottleneck it is one that is intended to keep tranga alive as long as possible.

@C9Glax C9Glax closed this as completed Jan 27, 2024
@C9Glax
Copy link
Owner

C9Glax commented Jan 27, 2024

On the initial download if you have 100 Manga and 50 Chapters / 20 Pages that comes out to 1005020 = 100000 seconds, 1666 minutes, 27 hours.
If you download all of them from the same site.
Tranga will parallel jobs for different sites, so that reduces that time.

@C9Glax C9Glax added question Further information is requested wontfix This will not be worked on labels Jan 27, 2024
@Nas-77
Copy link
Author

Nas-77 commented Jan 27, 2024

I see so its better to use different sources, at least for the initial download. Thanks

@IsXGeo
Copy link

IsXGeo commented Jan 31, 2024

While I fully understand why you've made this decision, what if I happen to have a manga with over 3000 chapters containing anywhere from 10 - 25 images each. And I have more than one manga with a few hundred chapters. If it's a user-agent issue, could you allow the user to edit the user-agent in the same way FMD2 does?

@C9Glax
Copy link
Owner

C9Glax commented Jan 31, 2024

@IsXGeo yup shouldn't be too difficult.

@C9Glax
Copy link
Owner

C9Glax commented Jan 31, 2024

@IsXGeo So custom user-agent is now implemented, and you can override the rate-limits too.
<tranga:port>/Settings/customRequestLimit?requestType=1&requestsPerMinute=1&connector=Mangaworld
It's just not on the website yet.

@IsXGeo
Copy link

IsXGeo commented Feb 1, 2024

@IsXGeo So custom user-agent is now implemented, and you can override the rate-limits too.

<tranga:port>/Settings/customRequestLimit?requestType=1&requestsPerMinute=1&connector=Mangaworld

It's just not on the website yet.

Neat, thanks. Just to confirm currently the way to modify the rate limit is to change the number through that browser url?

Because It seems to just give me an nginx error

@C9Glax
Copy link
Owner

C9Glax commented Feb 1, 2024

Oh that is two issues:
1 nginx is running the website, the tranga port is for the api (standard 6531).
But its also a POST request and yea your browser does GET requests...
Might have to think about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants