Andres Biarge
Andres Biarge

Reputation: 389

PORT environment variable changed Google App Engine

I'm using Google App Engine nodejs8 standard environment and I've seen they've changed the PORT environment variable value.

It used to be 8080 and now it's 8081 and thus it's firing some nginx warnings:

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /tmp/start-nginx/nginx.conf:2

This warning was not allowing to access any express routes. I've manually changed the listening port to 8080 and now express is running OK, but:

start: Cannot start nginx. Performance may be degraded. Fallback mechanism is unsupported and may be removed at any time. App should listen on PORT environment variable. Fallback engaged: app is listening on port 8080

Upvotes: 0

Views: 3500

Answers (2)

Andres Biarge
Andres Biarge

Reputation: 389

I was contacted by a Google engineer and told that it was a problem with the nginx version. It's fixed now.

So, listening to the PORT environment variable in your app should remain the good practice to follow.

Upvotes: 0

Diego Sucaria
Diego Sucaria

Reputation: 324

temporal workaround:

if someone hits this problem, heres a workaround: change runtime to nodejs10 in your app.yaml

runtime: nodejs10

Upvotes: 0

Related Questions