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

Failed to write backup file: Automatic backup fails due to the timeout #1297

Closed
dmitry-do opened this issue Mar 23, 2022 · 5 comments · Fixed by #1298
Closed

Failed to write backup file: Automatic backup fails due to the timeout #1297

dmitry-do opened this issue Mar 23, 2022 · 5 comments · Fixed by #1298
Milestone

Comments

@dmitry-do
Copy link
Contributor

We have a fairly large number of comments (~160Mb uncompressed)
therefore an automatic backup fails after 15 minutes due to the timeout:

$ remark42 backup -s remark
remark42 v1.9.0-0521c702-20220124T12:35:27
2022/03/15 04:29:07.000 [INFO]  export to ./backup/, site remark
2022/03/15 04:44:07.044 [WARN]  failed to close response, context deadline exceeded
2022/03/15 04:44:07.044 [ERROR] failed with context deadline exceeded
failed to write backup file backup/userbackup-remark-20220315T042907.gz
github.com/umputun/remark42/backend/app/cmd.(*BackupCommand).Execute
	/build/backend/app/cmd/backup.go:76
main.main.func1
	/build/backend/app/main.go:55
github.com/umputun/go-flags.(*Parser).ParseArgs
	/build/backend/vendor/github.com/umputun/go-flags/parser.go:331
github.com/umputun/go-flags.(*Parser).Parse
	/build/backend/vendor/github.com/umputun/go-flags/parser.go:190
main.main
	/build/backend/app/main.go:62
runtime.main
	/usr/local/go/src/runtime/proc.go:255
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1581
2022/03/15 04:44:07.044 [ERROR] failed with context deadline exceeded
failed to write backup file backup/userbackup-remark-20220315T042907.gz
github.com/umputun/remark42/backend/app/cmd.(*BackupCommand).Execute
	/build/backend/app/cmd/backup.go:76
main.main.func1
	/build/backend/app/main.go:55
github.com/umputun/go-flags.(*Parser).ParseArgs
	/build/backend/vendor/github.com/umputun/go-flags/parser.go:331
github.com/umputun/go-flags.(*Parser).Parse
	/build/backend/vendor/github.com/umputun/go-flags/parser.go:190
main.main
	/build/backend/app/main.go:62
runtime.main
	/usr/local/go/src/runtime/proc.go:255
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1581
failed to write backup file backup/userbackup-remark-20220315T042907.gz: context deadline exceeded

Is there are a reason for having it set to 15 minutes by default?
Would that make sense to increase the default timeout value to 60m?

Timeout time.Duration `long:"timeout" default:"15m" description:"export (backup) timeout"`

// BackupCommand set of flags and command for export
// ExportPath used as a separate element to leverage BACKUP_PATH. If ExportFile has a path (i.e. with /) BACKUP_PATH ignored.
type BackupCommand struct {
	ExportPath  string        `short:"p" long:"path" env:"BACKUP_PATH" default:"./var/backup" description:"export path"`
	ExportFile  string        `short:"f" long:"file" default:"userbackup-{{.SITE}}-{{.TS}}.gz" description:"file name"`
	Site        string        `short:"s" long:"site" env:"SITE" default:"remark" description:"site name"`
	Timeout     time.Duration `long:"timeout" default:"15m" description:"export (backup) timeout"`
	AdminPasswd string        `long:"admin-passwd" env:"ADMIN_PASSWD" required:"true" description:"admin basic auth password"`
	CommonOpts
}
@dmitry-do
Copy link
Contributor Author

Hi @paskal,
Thank you for the fix! When do you plan on making a new Remark42 release?

@paskal
Copy link
Sponsor Collaborator

paskal commented Apr 5, 2022

We just found some CSS problem resulting in vote arrows not showing up in master, we'll tag the new release once it's fixed.

@paskal
Copy link
Sponsor Collaborator

paskal commented May 13, 2022

@dmitry-konchalenkov, we're close to the new release, pending a test run for around the week to make sure nothing is broken.

@paskal
Copy link
Sponsor Collaborator

paskal commented Jun 12, 2022

@dmitry-konchalenkov I forgot to ping you there, v1.10.1 is the latest version as of now and it includes the fix for the problem you described.

@dmitry-do
Copy link
Contributor Author

@paskal No problem: We've updated once 1.10.1 was released! Have a nice weekend!

@paskal paskal added this to the v1.10 milestone Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants