I am using the Ruby on Rails on Ubuntu (nginx and unicorn) application image for my server. I configured unicorn and nginx to load my app and everything seemed to be working. Then I tried to use the contact form on my site and it appeared to work but nothing went through (it also completed too fast).
My first question is where can I find webrick like logs for my unicorn server? I looked at /home/unicorn/log/unicorn.log but that doesn't have the information I need.
On reboot this is what the unicorn process looks like:
rails@edawebdesign:~$ ps -e f | grep unicorn
1179 pts/1 S+ 0:00 \_ grep unicorn
779 ? Sl 0:00 unicorn master -D -c /home/unicorn/unicorn.conf -E production
782 ? Sl 0:02 \_ unicorn worker -D -c /home/unicorn/unicorn.conf -E production
784 ? Sl 0:02 \_ unicorn worker -D -c /home/unicorn/unicorn.conf -E production
This is the only way I can get my contact form to work:
1. sudo kill the master and worker processes
2. go to the root of my app and run unicorn_rails &:
rails@edawebdesign:~/apps/edawebdesign/current$ unicorn_rails &
rails@edawebdesign:~/apps/edawebdesign/current$ I, [2014-02-22T19:59:19.695911 #1243] INFO -- : listening on addr=0.0.0.0:8080 fd=9
I, [2014-02-22T19:59:19.696312 #1243] INFO -- : worker=0 spawning...
I, [2014-02-22T19:59:19.697360 #1243] INFO -- : master process ready
I, [2014-02-22T19:59:19.698812 #1245] INFO -- : worker=0 spawned pid=1245
I, [2014-02-22T19:59:19.699163 #1245] INFO -- : Refreshing Gem list
I, [2014-02-22T19:59:21.426114 #1245] INFO -- : worker=0 ready
Then I get a slightly different looking unicorn process list:
rails@edawebdesign:~/apps/edawebdesign/current$ ps -e f | grep unicorn
1243 pts/1 Sl 0:00 \_ unicorn_rails master -l0.0.0.0:8080
1245 pts/1 Sl 0:01 | \_ unicorn_rails worker -l0.0.0.0:8080
1266 pts/1 S+ 0:00 \_ grep unicorn
This results in my app working as expected. Anyone have an idea of what is going on here?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart.
If you run into issues leave a comment, or add your own answer to help others.