postgresql - Is it normal for Rails application to keep so many idle Puma and Postgres connections? -


i have rails app puma server , delayedjob. did load testing of - multiple requests @ same time etc. , when looked @ htop found number of processes made me suspicious puma leaking /not killing processes. on other hand may normal behavior. did see memory go though.

i have 2 puma workers total in rails configuration , 2 delayed job workers.

can experience puma confirm / discard concerns on memory leak?

  cpu[|                                                           1.3%]     tasks: 54, 19 thr; 1 running   mem[||||||||||||||||||||||||||||||||||||||||||||||||||||| 746/1652mb]     load average: 0.02 0.03 0.05    swp[                                                        0/2943mb]     uptime: 1 day, 12:48:05    1024 admin      20   0  828m  183m  3840 s  0.0 11.1  0:00.00 puma: cluster worker 0: 819  1025 admin      20   0  828m  183m  3840 s  0.0 11.1  0:00.00 puma: cluster worker 0: 819  1026 admin      20   0  828m  183m  3840 s  0.0 11.1  0:02.68 puma: cluster worker 0: 819  1027 admin      20   0  828m  183m  3840 s  0.0 11.1  0:00.43 puma: cluster worker 0: 819  1028 admin      20   0  828m  183m  3840 s  0.0 11.1  0:07.04 puma: cluster worker 0: 819  1029 admin      20   0  828m  183m  3840 s  0.0 11.1  0:00.05 puma: cluster worker 0: 819  1022 admin      20   0  828m  183m  3840 s  0.0 11.1  0:13.23 puma: cluster worker 0: 819  1034 admin      20   0  829m  178m  3900 s  0.0 10.8  0:00.00 puma: cluster worker 1: 819  1035 admin      20   0  829m  178m  3900 s  0.0 10.8  0:00.00 puma: cluster worker 1: 819  1037 admin      20   0  829m  178m  3900 s  0.0 10.8  0:02.68 puma: cluster worker 1: 819  1038 admin      20   0  829m  178m  3900 s  0.0 10.8  0:00.44 puma: cluster worker 1: 819  1039 admin      20   0  829m  178m  3900 s  0.0 10.8  0:07.12 puma: cluster worker 1: 819  1040 admin      20   0  829m  178m  3900 s  0.0 10.8  0:00.00 puma: cluster worker 1: 819  1033 admin      20   0  829m  178m  3900 s  0.0 10.8  0:14.28 puma: cluster worker 1: 819  1043 admin      20   0  435m  117m  3912 s  0.0  7.1  0:00.00 delayed_job.0  1041 admin      20   0  435m  117m  3912 s  0.0  7.1  0:52.71 delayed_job.0  1049 admin      20   0  435m  116m  3872 s  0.0  7.1  0:00.00 delayed_job.1  1047 admin      20   0  435m  116m  3872 s  0.0  7.1  0:52.98 delayed_job.1  1789 postgres   20   0  125m 10964  7564 s  0.0  0.6  0:00.26 postgres: admin app_production_ [local] idle  1794 postgres   20   0  127m 11160  6460 s  0.0  0.7  0:00.18 postgres: admin app_production_ [local] idle  1798 postgres   20   0  125m 10748  7484 s  0.0  0.6  0:00.24 postgres: admin app_production_ [local] idle  1811 postgres   20   0  127m 10996  6424 s  0.0  0.6  0:00.11 postgres: admin app_production_ [local] idle  1817 postgres   20   0  127m 11032  6460 s  0.0  0.7  0:00.12 postgres: admin app_production_ [local] idle  1830 postgres   20   0  127m 11032  6460 s  0.0  0.7  0:00.14 postgres: admin app_production_ [local] idle  1831 postgres   20   0  127m 11036  6468 s  0.0  0.7  0:00.20 postgres: admin app_production_ [local] idle  1835 postgres   20   0  127m 11028  6460 s  0.0  0.7  0:00.06 postgres: admin app_production_ [local] idle  1840 postgres   20   0  125m  7288  4412 s  0.0  0.4  0:00.04 postgres: admin app_production_ [local] idle  1847 postgres   20   0  125m  7308  4432 s  0.0  0.4  0:00.06 postgres: admin app_production_ [local] idle  1866 postgres   20   0  125m  7292  4416 s  0.0  0.4  0:00.06 postgres: admin app_production_ [local] idle  1875 postgres   20   0  125m  7300  4424 s  0.0  0.4  0:00.04 postgres: admin app_production_ [local] idle 

if number of processes matches concurrency configuration that's ok, if keeps growing every request may have issue processes hanging. default puma believe 16. looks using clustered mode have multiple processes , multiple threads per process.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -