Open jslanier opened 2 years ago
Fixed this by importing go debug package and then modifying main.go to raise MaxThreads
`package main
import ( "context" "os" "os/signal" "syscall" "runtime/debug" "github.com/peak/s5cmd/command" )
func main() { ctx, cancel := context.WithCancel(context.Background()) debug.SetMaxThreads(75000) go func() { ch := make(chan os.Signal, 1) signal.Notify(ch, os.Interrupt, syscall.SIGTERM) <-ch cancel() signal.Stop(ch) }()
if err := command.Main(ctx, os.Args); err != nil {
os.Exit(1)
}
}`
This appears to be a golang error that occurs when I am using Wasabi as the endpoint (instead of AWS S3). Apparently this can be changed by https://pkg.go.dev/runtime/debug#SetMaxThreads
I just do not know where to make this change in the code base. Can anyone point me in the right direction?
I have the endpoint-url set as an env variable
Here is the error: s5cmd cp --acl "public-read" --storage-class REDUCED_REDUNDANCY $localTilePath $newAWSPath runtime: program exceeds 10000-thread limit fatal error: thread exhaustion