unicorn

Too many redirects error while trying to configure rails application as SSL using nginx and unicorn

孤人 提交于 2019-12-03 08:56:23
问题 I am trying to configure a Rails application with SSL, using Nginx and Unicorn. I am trying to set it up locally. For that I first created a self-signed certificate using OpenSSL for Nginx. I followed the document for creating self-signed certificates. After that I configured my nginx.conf as below, inside the http block: upstream unicorn_myapp { # This is the socket we configured in unicorn.rb server unix:root_path/tmp/sockets/unicorn.sock fail_timeout=0; } server { listen 80; server_name

【Git】 GitLab配置优化及汉化

与世无争的帅哥 提交于 2019-12-03 08:41:54
GitLab配置   1、修改GitLab绑定的域名     a、修改/etc/gitlab/gitlab.rb配置文件,修改成自己的域名 1 external_url 'http://gitlab.example.com'     b、使配置生效       停止服务命令:gitlab-ctl stop       配置生效命令:gitlab-ctl reconfigure     c、启动服务       命令:gitlab-ctl start   2、修改GitLab仓库存储位置,GitLab仓库默认位子:/var/opt/gitlab/git-data     a、创建/data/soft/gitlab/gitlab-data目录,作为仓库存储目录       命令:mkdir /data/soft/gitlab/gitlab-data     b、修改gitlab配置文件,找到git_data_dir       命令:vim /etc/gitlab/gitlab.rb       增加内容: 1 git_data_dirs({ 2 "default" => { 3 "path" => "/data/soft/gitlab/gitlab-data" 4 } 5 })     c、是配置生效       停止服务命令:gitlab-ctl stop       配置生效命令

Unicorn restart issue with capistrano

半城伤御伤魂 提交于 2019-12-03 07:25:08
问题 We're deploying with cap and using a script that send USR2 to the unicorn process to reload and it usually works but every once in a while it will fail. When that happens looking in the unicorn log reveals that it's looking for a Gemfile in an old release directory that no longer exists. Exception : /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:14:in `build': /var/www/railsapps/inventory/releases/20111128233407/Gemfile not found (Bundler::GemfileNotFound) To

Switching to heroku cedar-14 leads to continous increase in memory consumption

走远了吗. 提交于 2019-12-03 07:18:41
Heroku recently announced that cedar-10 will no longer be supported after this year in November. Switching to cedar-14 led to an increase in memory consumption until I experienced R14 "Memory Quota exceeded" errors and had to restart heroku. The same problem with increase in memory usage occured with unicorn before I started using unicorn_worker_killer gem. Is there a known issue with cedar-14 and unicorn/unicorn_worker_killer? I didn't find anything. Here is a nice link for your 'problem' : http://blog.codeship.com/debugging-a-memory-leak-on-heroku/ It describe perfectly the continous

Rails 3.1, Unicorn and Apache: static files

前提是你 提交于 2019-12-03 07:02:27
I have Rails 3.1, Unicorn and Apache setup. My Apache settings are below and production.rb looks like this . I like using h264 streaming but since Rails is serving these video files, the Apache Mod won't work. DocumentRoot /blabla/current/public RewriteEngine On Options FollowSymLinks <Proxy balancer://unicornservers> BalancerMember http://127.0.0.1:4000 </Proxy> # Redirect all non-static requests to rails RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L] ProxyPass / balancer://unicornservers/ ProxyPassReverse / balancer:

Restarting Unicorn with USR2 doesn't seem to reload production.rb settings

此生再无相见时 提交于 2019-12-03 06:28:46
问题 I'm running unicorn and am trying to get zero downtime restarts working. So far it is all awesome sauce, the master process forks and starts 4 new workers, then kills the old one, everyone is happy. Our scripts send the following command to restart unicorn: kill -s USR2 `cat /www/app/shared/pids/unicorn.pid` On the surface everything looks great, but it turns out unicorn isn't reloading production.rb. (Each time we deploy we change the config.action_controller.asset_host value to a new CDN

Unicorn Eating Memory

99封情书 提交于 2019-12-03 06:25:37
I have a m1.small instance in amazon with 8GB hard disk space on which my rails application runs. It runs smoothly for 2 weeks and after that it crashes saying the memory is full. App is running on rails 3.1.1, unicorn and nginx I simply dont understand what is taking 13G ? I killed unicorn and 'free' command is showing some free space while df is still saying 100% I rebooted the instance and everything started working fine. free (before killing unicorn) total used free shared buffers cached Mem: 1705192 1671580 33612 0 321816 405288 -/+ buffers/cache: 944476 760716 Swap: 917500 50812 866688

Is my understanding of Unicorn, Sidekiq and DB Pool size correct?

你。 提交于 2019-12-03 05:55:11
问题 I have Unicorn, Sidekiq and Postgres setup. I am trying to understand the right configuration to set up so that I don't hit the maximum db connection limit. In Opsworks, the m1.small Postgres RDS instance can have a max of 121 connections. I have a db pool size of 5. Consider this. Sidekiq and Unicorn are its own process. So the db pool size for each process is 5. Correct me if my understanding here is wrong. If I have 5 unicorn process', that means 5*5=25 database connections Now this is the

Why would I want to use unicorn or thin instead of WEBrick for development purposes?

孤人 提交于 2019-12-03 03:33:09
问题 I've recently found that some people prefer using unicorn_rails instead of the default WEBrick as a web server for developing Rails applications. I understand that if I wanted to use unicorn in production, it could make kind of sense to try it out in development, but since the configuration is different in production, is it even relevant? Is there any real, tangible advantage that I would get from using thin or unicorn instead of WEBrick for developing a Rails application, such as speed or

What exactly is a pre-fork web server model?

隐身守侯 提交于 2019-12-03 01:59:45
问题 I want to know what exactly it means when a web server describes itself as a pre-fork web server. I have a few examples such as unicorn for ruby and gunicorn for python. More specifically, these are the questions: What problem does this model solve? What happens when a pre-fork web server is initially started? How does it handle request? Also, a more specific question for unicorn/gunicorn: Let's say that I have a webapp that I want to run with (g)unicorn. On initialization, the webapp will do