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

404 logs #1298

Open
pullmann4rent opened this issue Apr 24, 2024 · 2 comments
Open

404 logs #1298

pullmann4rent opened this issue Apr 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pullmann4rent
Copy link

pullmann4rent commented Apr 24, 2024

Hello,

every 2 seconds my express logs this:

PUT /api/inngest 200 12.690 ms - 54
PUT /api/inngest 200 13.458 ms - 54
GET /api/inngest 200 3.461 ms - 165
GET /x/inngest 404 0.919 ms - 148
GET /.netlify/functions/inngest 404 5.876 ms - 165
GET /.redwood/functions/inngest 404 1.831 ms - 165

Is this a error because of my implementation or is this normal ?

BTW: I use express

@pullmann4rent pullmann4rent added the bug Something isn't working label Apr 24, 2024
Copy link

linear bot commented Apr 24, 2024

INN-2970 404 logs

@jbranchaud
Copy link

@pullmann4rent I just ran into the same issue -- it turns out that this is by design.

Inngest scans for common ports and common paths where the API might be served and it does this every 2 seconds. You can see the relevant code here:

// Ports indicate the default ports that we attempt to scan on localhost
// when discovering SDK-based endpoints
Ports = []int{
// le derp
80, 443,
// Rails, Express & N*xt routes
3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010,
// Django
5000,
// Other common ports
8000, 8080, 8081, 8888,
// Redwood
8910, 8911,
}
// Paths indicate the paths we attempt to hit when a web server is available.
// These are the default, recommended paths for hosting Inngest routes.
Paths = []string{
// Defaults
"/api/inngest",
"/x/inngest",
// Netlify
"/.netlify/functions/inngest",
// Redwood
"/.redwood/functions/inngest",
}
timeout = 2 * time.Second
hc = http.Client{
Timeout: timeout,
}

I added --no-discovery and -u http://localhost:3000/api/inngest to the inngest dev server command to get it to quiet down a bit and stop pinging my other unrelated dev servers running on, for example, port 5000.

$ pnpx inngest-cli@latest dev --no-discovery -u http://localhost:3000/api/inngest

jbranchaud added a commit to skillrecordings/egghead-next that referenced this issue Apr 29, 2024
it was being too noisy and hitting a bunch of local servers that it
didn't need to be hitting, so I added the `--no-discovery` and `-u`
flags to have it only hitting the egghead-next dev server.

inngest/inngest#1298 (comment)
zacjones93 pushed a commit to skillrecordings/egghead-next that referenced this issue May 2, 2024
it was being too noisy and hitting a bunch of local servers that it
didn't need to be hitting, so I added the `--no-discovery` and `-u`
flags to have it only hitting the egghead-next dev server.

inngest/inngest#1298 (comment)

Co-authored-by: Creeland A. Provinsal <cree@egghead.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants