jeudi 28 mai 2015

puma looks OK, but cycles through life, defunct, life, defunct, every 10 seconds or so

I am running a rails app on an EC2 instance running ubuntu, using nginx and puma.

I believe I have nginx and puma configured correctly - at least, they were working fine this morning.

Now, after having restarted the EC2 instance, I cannot for the life of me get puma to run again properly. nginx is set up properly - for a ssl connection. Puma appears to run properly. When it starts, I see

$RAILS_ENV=production bundle exec puma -C config/puma.rb 
[1501] Puma starting in cluster mode...
[1501] * Version 2.11.2 (ruby 2.0.0-p645), codename: Intrepid Squirrel
[1501] * Min threads: 0, max threads: 16
[1501] * Environment: production
[1501] * Process workers: 1
[1501] * Phased restart available
[1501] * Listening on unix:///var/run/puma/mything_app.sock
[1501] * Daemonizing...

which appears to work fine. However, if I repeatedly run ps aux | grep puma, I see that the cluster worker exists, then becomes defunct, then exists again (with a new PID), over a cycle of 10 seconds or so.

I have played with the permissions of the bind directory var/run/puma quite a bit: currently they are 777, which is very permissive, I have tried many other permutations of 7s, 6s and 0s, every other permutation that is not 777 gives me error access denied type messages when starting puma.

The puma log is stuck on the single line === puma startup: 2015-05-28 09:29:29 +0000 ===.

The nginx error log sometimes says things about connection reset by peer.

I have been talking with AWS people, and I'm sure my security groups are set up correctly.

I am running out of ideas as to what has gone wrong - any help is much appreciated. Please let me know if you require further information.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire