Browse Source

Merge pull request #15395 from briangann/20190212_adjust_notifier_render_timeout

allow 90 percent of alertTimeout for rendering to complete vs 50 percent
Torkel Ödegaard 6 years ago
parent
commit
cd8f5835ec
1 changed files with 2 additions and 1 deletions
  1. 2 1
      pkg/services/alerting/notifier.go

+ 2 - 1
pkg/services/alerting/notifier.go

@@ -3,6 +3,7 @@ package alerting
 import (
 import (
 	"errors"
 	"errors"
 	"fmt"
 	"fmt"
+	"time"
 
 
 	"github.com/grafana/grafana/pkg/bus"
 	"github.com/grafana/grafana/pkg/bus"
 	"github.com/grafana/grafana/pkg/components/imguploader"
 	"github.com/grafana/grafana/pkg/components/imguploader"
@@ -126,7 +127,7 @@ func (n *notificationService) uploadImage(context *EvalContext) (err error) {
 	renderOpts := rendering.Opts{
 	renderOpts := rendering.Opts{
 		Width:           1000,
 		Width:           1000,
 		Height:          500,
 		Height:          500,
-		Timeout:         alertTimeout / 2,
+		Timeout:         time.Duration(float64(alertTimeout) * 0.9),
 		OrgId:           context.Rule.OrgId,
 		OrgId:           context.Rule.OrgId,
 		OrgRole:         m.ROLE_ADMIN,
 		OrgRole:         m.ROLE_ADMIN,
 		ConcurrentLimit: setting.AlertingRenderLimit,
 		ConcurrentLimit: setting.AlertingRenderLimit,