You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README of the go-sitemap-generator repository provides an example for setting concurrency that can lead to unintended consequences, causing severe performance degradation and downtime in production environments.
Expected Behavior
The README example should provide clear and accurate guidance on setting concurrency, avoiding any negative impact on the overall application performance.
Clarification on Misleading Information
The First README example sm := stm.NewSitemap(1) might be misconstrued as endorsing the recommended initialization with 1. However, using this value inadvertently changes the Golang runtime to utilize only one core for the entire application, resulting in severe performance degradation and potential downtimes.
Additionally, the line "To disable concurrency, set number of CPUs to 1." in the README is misleading. It may be misinterpreted as suggesting the setting of internal max goroutines to 1, rather than correctly understanding that it impacts the whole Go application by limiting the go runtime to a single core.
Proposed Solution
Update the README examples to better guide users on configuring concurrency without causing unintended consequences.
Additional Context
I encountered this issue while working as a Backend intern at Testbook. The incorrect configuration resulted in a downtime on our production environment.
Solution :
Update the following text in readme.md
To disable concurrency, set the number of CPUs to 1 for the whole Go Application [Not Recommended].
sm:=stm.NewSitemap(1)
And change the first example to this :
func main() {
sm := stm.NewSitemap(0)
....
Changes are in italics.
The text was updated successfully, but these errors were encountered:
Issue Description
The README of the
go-sitemap-generator
repository provides an example for setting concurrency that can lead to unintended consequences, causing severe performance degradation and downtime in production environments.Expected Behavior
The README example should provide clear and accurate guidance on setting concurrency, avoiding any negative impact on the overall application performance.
Clarification on Misleading Information
The First README example
sm := stm.NewSitemap(1)
might be misconstrued as endorsing the recommended initialization with1
. However, using this value inadvertently changes the Golang runtime to utilize only one core for the entire application, resulting in severe performance degradation and potential downtimes.Additionally, the line "To disable concurrency, set number of CPUs to 1." in the README is misleading. It may be misinterpreted as suggesting the setting of internal max goroutines to 1, rather than correctly understanding that it impacts the whole Go application by limiting the go runtime to a single core.
Proposed Solution
Update the README examples to better guide users on configuring concurrency without causing unintended consequences.
Additional Context
I encountered this issue while working as a Backend intern at Testbook. The incorrect configuration resulted in a downtime on our production environment.
Solution :
Update the following text in readme.md
To disable concurrency, set the number of CPUs to 1 for the whole Go Application [Not Recommended].
And change the first example to this :
func main() {
sm := stm.NewSitemap(0)
....
Changes are in italics.
The text was updated successfully, but these errors were encountered: