Puma App Instances on Heroku

2019-08-10 20:26发布

问题:

I'm using New Relic for server analytics of a Heroku app. The app uses the Puma web server and MAX_THREADS is set to 1.

Why does New Relic says that I've got 4 app instances on each Heroku dyno rather than just 1?

web.1
4 app instances

web.2
4 app instances

worker.1
1 app instance

I'm thinking that an "app instance" on New Relic is the same as a thread. Or does it refer to something else?

回答1:

App instance means worker. this worker is different with heroku worker. it is process that is forked.

If you set 1 max thread, there are 4 processes(workers) and each process has 1 thread.

Check your puma's thread and worker configuration



标签: heroku puma