thislooksfun
thislooksfun

Reputation: 1089

unknown directive "passenger_force_max_concurrent_requests_per_process"

I'm trying to write a web backend using Node.js, Passenger, and nginx.
It was working great until I tried to add multiple node processes using the passenger_force_max_concurrent_requests_per_process setting. For some reason adding that setting gives me the following error:
unknown directive "passenger_force_max_concurrent_requests_per_process"

If I comment that line out it works fine, so I really don't know what's going on. Any help would be welcome.

Thanks,
-tlf

EDIT:

nginx and Passenger both work perfectly until I try to change that setting, at which point nginx fails to start due to the aforementioned error. If I remove that line, everything works normally again.

And yes, I do know exactly what that line of code does, which is why I'm trying to add it in the first place. I would really appreciate being able to set that property, but I am unable to because it's crashing.

Upvotes: 0

Views: 258

Answers (2)

Hongli
Hongli

Reputation: 18944

The most likely possibility is that your Passenger version is too old. passenger_force_max_concurrent_requests_per_process was introduced in version 5.0.22.

The other possibility is that you did not update your Nginx installation when upgrading Passenger.

Upvotes: 1

SkyWalker
SkyWalker

Reputation: 29168

You have made it comment out that means it is made 0.

There are two main use cases for this option:

  1. To make dynamic process scaling work in Node.js and Meteor applications. Set this option to approximately the number of concurrent requests at which the performance of a single process begins to degrade.
  2. To make SSE and WebSockets work well in Ruby applications. Set this option to 0.

Resource Link:

  1. passenger_force_max_concurrent_requests_per_process
  2. Dynamic scaling of Node.js application processes vs fixed process pool

UPDATE1:

passenger_start_timeout specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.

Upvotes: 0

Related Questions