diff --git a/CHANGELOG.md b/CHANGELOG.md index 8175ccd5..815b1066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - Updatated to `modernc.org/sqlite` 1.36.0 (SQLite 3.49.0). +- Bumped the default request read and write timeouts to 5mins (_old 3mins_) to accommodate slower internet connections and larger file uploads/downloads. + _If you want to change them you can modify the `OnServe` hook's `ServeEvent.ReadTimeout/WriteTimeout` fields as shown in [#6550](https://github.com/pocketbase/pocketbase/discussions/6550#discussioncomment-12364515)._ + ## v0.25.9 diff --git a/apis/serve.go b/apis/serve.go index c3a450d6..324d434c 100644 --- a/apis/serve.go +++ b/apis/serve.go @@ -143,9 +143,9 @@ func Serve(app core.App, config ServeConfig) error { NextProtos: []string{acme.ALPNProto}, }, // higher defaults to accommodate large file uploads/downloads - WriteTimeout: 3 * time.Minute, - ReadTimeout: 3 * time.Minute, - ReadHeaderTimeout: 30 * time.Second, + WriteTimeout: 5 * time.Minute, + ReadTimeout: 5 * time.Minute, + ReadHeaderTimeout: 1 * time.Minute, Addr: mainAddr, BaseContext: func(l net.Listener) context.Context { return baseCtx