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

Update readme.md about maxDuration #2792

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Update readme.md about maxDuration #2792

merged 3 commits into from
Jun 9, 2023

Conversation

ForsakenRei
Copy link
Contributor

@ForsakenRei ForsakenRei commented Jun 8, 2023

I think we can remove this warning section since that value in .json has been changed to 10 by default nowadays?

Also removed related section in self deployment guide.

I think we can remove this warning section since that value in  `.json` has been changed to 10 by default nowadays?
@vercel
Copy link

vercel bot commented Jun 8, 2023

@ForsakenRei is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the documentation Improvements or additions to documentation. label Jun 8, 2023
remove related section in self deployment section as well
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (38c8a7a) 97.59% compared to head (3ea030a) 97.59%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2792   +/-   ##
=======================================
  Coverage   97.59%   97.59%           
=======================================
  Files          24       24           
  Lines        4814     4823    +9     
  Branches      447      453    +6     
=======================================
+ Hits         4698     4707    +9     
  Misses        115      115           
  Partials        1        1           

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@qwerty541 qwerty541 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ForsakenRei Looks like you are right and we no longer need to keep this warning section, but i think that probably it can be useful to add inverse warning for pro plan users to remind them about ability to increase maximum execution time. What do you think @rickstaa?

@qwerty541 qwerty541 requested a review from rickstaa June 9, 2023 02:25
@ForsakenRei
Copy link
Contributor Author

That's a good point. Though I'm not sure if there is any benefit of increasing the max execution time, like more frequently data refresh?

@qwerty541
Copy link
Collaborator

That's a good point. Though I'm not sure if there is any benefit of increasing the max execution time, like more frequently data refresh?

Parameter maxDuration is an integer defining how long your serverless function should be allowed to run on every request in seconds. I think that increasing max execution time make sense when your vercel instance experiencing high load and you are using several different GitHub API tokens. Currently the application works the following way: it iterates through provided API tokens array and try to fetch card data until one of requests succeed. When most of your API tokens hit the limiter it start taking a while.

@ForsakenRei
Copy link
Contributor Author

That's a good point. Though I'm not sure if there is any benefit of increasing the max execution time, like more frequently data refresh?

Parameter maxDuration is an integer defining how long your serverless function should be allowed to run on every request in seconds. I think that increasing max execution time make sense when your vercel instance experiencing high load and you are using several different GitHub API tokens. Currently the application works the following way: it iterates through provided API tokens array and try to fetch card data until one of requests succeed. When most of your API tokens hit the limiter it start taking a while.

I see, I'm open to this suggestion for sure.

@rickstaa
Copy link
Collaborator

rickstaa commented Jun 9, 2023

@ForsakenRei and @qwerty541 the reason we used to have a maxDuration of 30 on the public instance was the following:

Open the vercel.json file and change the maxDuration to 10.

It's not a bug, it was intentionally reduced to 30s because by default on PRO plan it sets to 1min which is too high and was causing too much memory usage. but for non-pro users the duration can only be <10s thus 30s fails.

Originally posted by @anuraghazra in #1416 (comment)

This behaviour was simplified by @Zo-Bro-23 who created a GitHub action that changes the maxDuration on our public instance during deployment. This was done since more people are on the free Vercel plan than the Pro Vercel plan.

So, you're right @ForsakenRei, the message in the readme should be changed or removed.

@rickstaa
Copy link
Collaborator

rickstaa commented Jun 9, 2023

@ForsakenRei and @qwerty541 the reason we used to have a maxDuration of 30 on the public instance was the following:

Open the vercel.json file and change the maxDuration to 10.
It's not a bug, it was intentionally reduced to 30s because by default on PRO plan it sets to 1min which is too high and was causing too much memory usage. but for non-pro users the duration can only be <10s thus 30s fails.
Originally posted by @anuraghazra in #1416 (comment)

This behaviour was simplified by @Zo-Bro-23 who created a GitHub action that changes the maxDuration on our public instance during deployment. This was done since more people are on the free Vercel plan than the Pro Vercel plan.

So, you're right @ForsakenRei, the message in the readme should be changed or removed.

I updated this message to remove the suggested warning, as it was incorrect. I, however, would change it to something along the line of:

Note
If you are on the Pro (i.e. paid) Vercel plan, the maxDuration value found in the Vercel.json can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than 30 seconds to prevent high memory usage.

@qwerty541 I added this suggestion to this pull request. Please review 🙏🏻.

@qwerty541 qwerty541 merged commit 44c268e into anuraghazra:master Jun 9, 2023
@ForsakenRei ForsakenRei deleted the patch-1 branch June 9, 2023 13:14
j4ckofalltrades pushed a commit to j4ckofalltrades/gh-stats that referenced this pull request Jun 10, 2023
* feat: add CACHE_SECONDS environment variable (anuraghazra#2266)

* feat: add CACHE_SECONDS environment variable

This commit adds the CACHE_SECONDS environment variable. This variable
can be used to circumvent our cache clamping values for self hosted
Vercel instances.

* refactor: apply formatter

* Remove redundant ask for theme screenshot from CONTRIBUTING.md (anuraghazra#2797)

* Fix clampValue function docstring (anuraghazra#2796)

* Docs: add warning about top languages card behavior. (anuraghazra#2789)

* Docs: add warning about top languages card behavior.

* dev

* dev

* Update readme.md about maxDuration (anuraghazra#2792)

* Update readme.md about maxDuration

I think we can remove this warning section since that value in  `.json` has been changed to 10 by default nowadays?

* Update readme.md

remove related section in self deployment section as well

* docs: add inverse maxDuration warning

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>

* docs: add package debug steps to contribution guidelines (anuraghazra#2798)

* Beautify themes contribution note inside CONTRIBUTING.md (anuraghazra#2800)

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
Co-authored-by: しぐれ <23041178+ForsakenRei@users.noreply.github.com>
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 24, 2023
* Update readme.md about maxDuration

I think we can remove this warning section since that value in  `.json` has been changed to 10 by default nowadays?

* Update readme.md

remove related section in self deployment section as well

* docs: add inverse maxDuration warning

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
setdebarr pushed a commit to setdebarr/github-readme-stats that referenced this pull request Jan 12, 2024
* Update readme.md about maxDuration

I think we can remove this warning section since that value in  `.json` has been changed to 10 by default nowadays?

* Update readme.md

remove related section in self deployment section as well

* docs: add inverse maxDuration warning

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants