Comments (6)
I created a PR #282 to address this issue, can you please take a look if it works for you? If so, I'll merge it to the codebase and release a new version of the gem.
Thanks!
from opsworks_ruby.
@ajgon
Great, it works fine!
from opsworks_ruby.
This seems to be similar to the problem we addressed in #251.
Enviroment variables are embed in monitrc files. So environment variables change causes monit reload
. If appserver and worker is used in a instance both, monit reload
is called twice. One for appserver's monitrc, one for worker's monitrc.
In the log, the second Reinitializing Monit -- control file '/etc/monit/monitrc'
cancels 'puma_rails' restart on user request
.
from opsworks_ruby.
It seems to work if we use creates
to limit the execution of monit reload
to one time. Like this:
# configure.rb
every_enabled_application do |application|
# snip
timestamp = Time.now.to_i
execute 'monit reload' do
command "monit reload && touch /tmp/.monit-reload-#{timestamp}"
action :nothing
only_if 'which monit'
creates "/tmp/.monit-reload-#{timestamp}"
end
end
from opsworks_ruby.
@ajgon #282 does not work 😢 And I found a new issue #284.
Even if pumactl restart
is successfully to run, it will not resolve #284.
I think it is not necessary to embed environment variables in monitrc
for puma.
If we are using dot_env
, it does not override environment variables already defined by default. If we set values in monitrc, puma worker processes will not reflect it even if the .env
value changes.
If we do not include environment variables in monitrc, changes in .env
values will be reflected to puma worker processes.
And puma's monitrc is not changed before/after the deploy which has the change of environment variables, it avoids monit reload
for puma. Therefore, puma will restart even after a deployment in which environment variables have been changed. In other words, this issue (#281) is resolved.
My patch is here: kzkn@ba95731
from opsworks_ruby.
@kzkn I added your patch here: b6fa01f - would it work for you?
from opsworks_ruby.
Related Issues (20)
- unicorn startup never returns, causes race condition at setup and during all restarts HOT 1
- ruby 2.7 not available on centos 7 or amazonlinux 2 HOT 1
- insecure by default: apache server-status is exposed HOT 1
- enforce_ownership step of deploy gets slower and slower on each deploy because of complexity in shared/cache/assets HOT 5
- Migrate to travis-ci.com or use github actions instead HOT 1
- Support for GoodJob? HOT 3
- Brightbox ruby-ng disontinued ? HOT 2
- SSL Error With Nginx Key Download HOT 14
- remove
- Sidekiq missing -e param HOT 1
- Docker change to installed chef HOT 1
- Rubocop Target Ruby Version HOT 2
- Monit always waits for puma to complete restart until its timeout after deployment HOT 11
- Having worker and appserver running only on particular layers HOT 1
- The change of environment variables are applied to puma worker processes HOT 3
- Column change migrations fails HOT 1
- Setup/configure constantly rerunning after upgrading to Ubuntu 18.04/OpsWorks agent 4040. Also unable to upload chef.logs to s3. HOT 2
- Sidekiq goes quiet after deploy HOT 2
- About archiving the project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opsworks_ruby.