Heroku上的Puma应用实例 [英] Puma App Instances on Heroku

查看:90
本文介绍了Heroku上的Puma应用实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用New Relic对Heroku应用程序进行服务器分析.该应用程序使用Puma Web服务器,并将MAX_THREADS设置为1.

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.

为什么New Relic说我在每个Heroku测功机上有4个应用程序实例,而不仅仅是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

我认为New Relic上的应用程序实例"与线程相同.还是指别的东西?

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

推荐答案

应用实例表示工作程序.这个工人和heroku工人不同.是分叉的过程.

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

如果设置1个最大线程,则有4个进程(工人),每个进程有1个线程.

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

检查您的puma的线程和工作程序配置

Check your puma's thread and worker configuration

这篇关于Heroku上的Puma应用实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆