diff --git a/bgs/bgs.go b/bgs/bgs.go index 59d9a555d..bc2a9972f 100644 --- a/bgs/bgs.go +++ b/bgs/bgs.go @@ -749,7 +749,7 @@ func (bgs *BGS) handleFedEvent(ctx context.Context, host *models.PDS, env *event rebasesCounter.WithLabelValues(host.Host).Add(1) ai, err := bgs.Index.LookupUser(ctx, u.ID) if err != nil { - return err + return fmt.Errorf("failed to look up user (slow path): %w", err) } // TODO: we currently do not handle events that get queued up @@ -769,7 +769,7 @@ func (bgs *BGS) handleFedEvent(ctx context.Context, host *models.PDS, env *event if errors.Is(err, carstore.ErrRepoBaseMismatch) || ipld.IsNotFound(err) { ai, err := bgs.Index.LookupUser(ctx, u.ID) if err != nil { - return err + return fmt.Errorf("failed to look up user (err case): %w", err) } span.SetAttributes(attribute.Bool("catchup_queue", true)) diff --git a/cmd/bigsky/main.go b/cmd/bigsky/main.go index 2cd6105eb..cebccc8ab 100644 --- a/cmd/bigsky/main.go +++ b/cmd/bigsky/main.go @@ -283,9 +283,12 @@ func Bigsky(cctx *cli.Context) error { rlskip := os.Getenv("BSKY_SOCIAL_RATE_LIMIT_SKIP") ix.ApplyPDSClientSettings = func(c *xrpc.Client) { - if c.Host == "https://bsky.social" && rlskip != "" { - c.Headers = map[string]string{ - "x-ratelimit-bypass": rlskip, + if c.Host == "https://bsky.social" { + c.Client.Timeout = time.Minute * 30 + if rlskip != "" { + c.Headers = map[string]string{ + "x-ratelimit-bypass": rlskip, + } } } }