amber icon indicating copy to clipboard operation
amber copied to clipboard

Unexpected behavior on Cluster mode

Open faustinoaq opened this issue 7 years ago • 5 comments

Description

If I run an amber app with process_count: 2 I get 3 processes. This is unexpected :sweat_smile:

Steps to Reproduce

  1. Run an amber app with process_count: 2 in background (ex: using a service)
  2. use ps aux to see how many app processes are forked

Expected behavior: 2 processes are forked

Actual behavior: 3 processes are forked

Reproduces how often: 100%

Versions

amber v0.7.2

Additional Information

screenshot_20180616_112114

faustinoaq avatar Jun 16 '18 16:06 faustinoaq

Lets pair on this when you have time. Cause I unable to reproduce this.

I think we need a server_end and server_start event listeners so we can kill stuff in the background. What I think is happening is that some processes are not kill properly.

eliasjpr avatar Jun 16 '18 16:06 eliasjpr

@eliasjpr I added a screenshot, This only happens when I add use process_count: 2,

IMO this is a minor issue. I just wanted to track it :sweat_smile:

faustinoaq avatar Jun 16 '18 16:06 faustinoaq

@eliasjpr Also if you notice the processes are being killed properly (see PIDs)

faustinoaq avatar Jun 16 '18 16:06 faustinoaq

Hi. I run into a similar issue and had to use a temporary solution. Here is my pull request for the Which is the fastest? project: [Crystal] Temporarily fix multi-processing mode of Amber server #1392 just now.

zhangkaizhao avatar Jun 04 '19 10:06 zhangkaizhao

We can now compile amber using the -Dpreview_mt flag to enable multi thread. I have tested this and it works.

See issue #1148

eliasjpr avatar Oct 02 '19 17:10 eliasjpr

Since there has been no feedback on this issue in several years and a workaround has been provided, we can safely close it. The child issue has been resolved as well.

codered avatar Jan 27 '24 06:01 codered