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

Remix server timeout #7332

Closed
3 tasks done
meza opened this issue Mar 4, 2023 · 5 comments
Closed
3 tasks done

Remix server timeout #7332

meza opened this issue Mar 4, 2023 · 5 comments
Labels
Package: remix Issues related to the Sentry Remix SDK Type: Bug

Comments

@meza
Copy link

meza commented Mar 4, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/remix

SDK Version

7.40.0

Framework Version

Remix 1.13.0

Link to Sentry event

No response

SDK Setup

// entry.server.tsx
Sentry.init({
  debug: true,
  dsn: process.env.SENTRY_DSN,
  tracesSampleRate: 1
});
// entry.client.tsx
Sentry.init({
  debug: true,
  dsn: window.appConfig.sentryDsn,
  tracesSampleRate: 1,
  integrations: [
    new Sentry.BrowserTracing({
      routingInstrumentation: Sentry.remixRouterInstrumentation(
        useEffect,
        useLocation,
        useMatches
      )
    })
  ]
});
// root.tsx
export default withSentry(App, {
  errorBoundaryOptions: { fallback: <Fallback /> }
});

// also tried
//export default withSentry(App);

It might be worth mentioning that I use "@architect/architect": "^10.10.2", to server the dev server as it provides a nice emulation of the AWS Lambda environment which is the destination for this.

Steps to Reproduce

  1. npm run dev
  2. open the localhost version of the app

Expected Result

Expecting the index page to load

Actual Result

When opening the page, it times out

image

This is the log in the server console.

Sentry Logger [log]: Integration installed: InboundFilters
Sentry Logger [log]: Integration installed: FunctionToString
Sentry Logger [log]: Integration installed: Console
Sentry Logger [log]: Integration installed: Http
Sentry Logger [log]: Integration installed: OnUncaughtException
Sentry Logger [log]: Integration installed: OnUnhandledRejection
Sentry Logger [log]: Integration installed: ContextLines
Sentry Logger [log]: Integration installed: LocalVariables
Sentry Logger [log]: Integration installed: Context
Sentry Logger [log]: Integration installed: Modules
Sentry Logger [log]: Integration installed: RequestData
Sentry Logger [log]: Integration installed: LinkedErrors
Sentry Logger [log]: [Tracing] starting http.server transaction - root
Sentry Logger [log]: [Tracing] Starting 'function.remix.loader' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [log]: [Tracing] Starting 'function.remix.loader' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [log]: [Tracing] Finishing 'function.remix.loader' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [log]: [Tracing] Finishing 'function.remix.loader' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [log]: [Tracing] Starting 'function.remix.document_request' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [warn]: Remix SDK was unable to wrap your root because of one or more missing parameters.
Sentry Logger [log]: [Tracing] Finishing 'function.remix.document_request' span on transaction 'root' (b84d6af4c2db3368).
Sentry Logger [log]: [Tracing] Finishing http.server transaction: root.
⚠️ Warning: Users/meza/dev/trance-stack/server timed out after hitting its 5s timeout!

If I comment out the Sentry.init in the entry.server.tsx, the client works and generating an error on the client goes through to Sentry. No joy on the server though

@meza
Copy link
Author

meza commented Mar 4, 2023

I tried downgrading Remix, same result.

@meza
Copy link
Author

meza commented Mar 4, 2023

I believe it is indeed the Arc server that's causing issues.

// remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
  future: {
    unstable_postcss: true
  },
  server: './server.js',
  serverMinify: true,
  ignoredRouteFiles: ['**/__snapshots__/**', '**/.*', '**/*.test.tsx', '**/*.test.ts'],
  appDirectory: 'src',
  serverBuildDirectory: "server",
  browserBuildDirectory: "public/build",
  serverBuildPath: "server/index.js",
  publicPath: "/_static/build",
};
// server.js

import { createRequestHandler } from '@remix-run/architect';
import * as build from '@remix-run/dev/server-build';

export const handler = createRequestHandler({
  build: build,
  mode: process.env.NODE_ENV
});

@meza
Copy link
Author

meza commented Mar 4, 2023

Related: #6062

@AbhiPrasad
Copy link
Member

I think #6062 covers it - so going to close this issue. We are blocked by for server-side support for lambda, but client side should be fine.

You could try instrumenting it yourself using our Serverless SDK. https://docs.sentry.io/platforms/node/guides/aws-lambda/

@AbhiPrasad AbhiPrasad added Package: remix Issues related to the Sentry Remix SDK and removed Status: Untriaged labels Mar 6, 2023
@meza
Copy link
Author

meza commented Mar 6, 2023

I think #6062 covers it - so going to close this issue. We are blocked by for server-side support for lambda, but client side should be fine.

You could try instrumenting it yourself using our Serverless SDK. https://docs.sentry.io/platforms/node/guides/aws-lambda/

I tried this and unfortunately it has yielded the same result. Client support is ok for now, I'll keep an eye on #6062.

Thanks ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: remix Issues related to the Sentry Remix SDK Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants