Articles of 独angular兽

应用得到了新闻,然后服务器被拥有。 我添加了8个服务器,仍然太慢

我们的新应用程序今天已经得到了很多媒体的关注,并且每小时都会有数以千计的新用户在使用,但是它变得如此之慢以至于无法使用。 我们正在使用Rails 3修补到最新的,Ubuntu,Unicorn,nginx,postgresql,memcache。 我已经添加了8个新的服务器,它几乎没有什么区别。 我也尝试将nginx的keepalive值设置为1.除了添加更多的服务器之外,我不知道如何改进响应时间。 我有10个独angular兽工人每个服务器运行。 问题似乎是每个服务器上的请求队列太长。 我可能是错误的,我不完全确定是什么原因造成的,我只知道它昨天正在以当前负载的2%完美工作。 任何帮助是极大的赞赏

如何在ec2上运行ruby / unicorn / nginx / app的AB Benchmarks?

我正准备与一个应用程序,并想知道是否有人可以给我一些见解我的基准。 他们如何比较,我可以做什么系统级的调整,以提高他们等等。 我的设置如下: m1.large amazon ec2实例,运行Ubuntu 11.04 Natty。 Nginx作为Web请求的反向代理。 这些请求被unix socket套接到一群提供ruby(1.9.2)应用程序的独angular兽工作者(Sinatra作为框架) 当运行apache替代时,如下ab -n 10000 -c 10 http://localhost/我得到的内存消耗可以忽略不计,还有更高的CPU峰值。 我看到大约75-80%的CPU使用率 最佳结果: Cpu(s): 43.1%us, 20.9%sy, 0.0%ni, 21.5%id, 1.0%wa, 0.0%hi, 2.4%si, 11.1%st 我的基准testing结果如下: Server Software: nginx/0.8.54 Server Hostname: loalhost Server Port: 80 Document Path: / Document Length: 3683 bytes Concurrency Level: 10 Time taken for tests: 13.072 seconds Complete […]

Linode Debian + rvm + nginx + Unicorn杀死主引导或不启动独angular兽

我是一个运行Debian 6的新Linode / Linux用户。我试图让我的Unicorn服务器在启动时启动,但由于某种原因,它不是,我无法追查任何错误信息。 Nginx开始正常,我有一个多用户RVM安装。 我的直觉是这与RVM有关。 这是/rails/todo我的unicorn_init.sh文件,在/etc/init.d/unicorn有一个符号链接: # unicorn_init.sh #!/bin/sh set -e TIMEOUT=${TIMEOUT-60} APP_ROOT=/rails/todo PID=$APP_ROOT/tmp/pids/unicorn.pid CMD="$APP_ROOT/bin/unicorn_rails -D -c $APP_ROOT/config/unicorn.rb -E production" GEM_HOME="/usr/local/rvm/gems/ruby-1.9.2-p290@global" action="$1" set -u old_id="$PID.oldbin" cd $APP_ROOT || exit 1 export GEM_HOME=$GEM_HOME sig () { test -s "$PID" && kill -$1 `cat $PID` } oldsig () { test -s $old_pid && kill -$1 `cat […]

独angular兽:分网站生成的链接断开

我目前正在努力站起来一个redmine的实例,但是目前在我的redmine实例中生成的链接都被破坏了。 我正在尝试从一个子url,即example.com/redmine服务redmine 我search了,但我还没有find关于前缀选项(类似于杂种)的任何信息, 我目前的资产和格式正常工作,从我以前的问题。 Redmine通过Apache / Unicorn服务 我目前的设置是apache /独angular兽 非常感谢 编辑 ruby –version ruby 1.9.3p194 rails –version Rails 3.2.6 unicorn –version unicorn v4.3.1 httpd -version Server version: Apache/2.2.22 (Unix) Server built: Jun 9 2012 01:42:02

我如何启动unicorn_rails作为在我的Ubuntu 12.04机器上安装rvm的启动脚本?

我的服务器上有一个rails应用程序。 我有一个脚本startup.sh启动unicorn_rails,然后nginx。 为了让我的服务器在系统启动时启动,我添加了一行来调用我的启动脚本到/etc/rc.local 但是,这不起作用。 我添加了一些检查,以确保脚本被调用,它是。 这是呼吁unicorn_rails,我认为是失败的。 有人对此有经验吗?

用于rails subdir部署的nginxconfiguration

我在configurationnginx服务我的Rails应用程序的静态文件时遇到了一些麻烦, 我是指应用的public/文件夹中的所有文件,而不仅仅是Rails资产pipe道中的文件。 看来我能够把事情做大部分工作,但我不知道如何把所有东西放在一起。 我的应用程序安装在服务器( /dashboard )的子目录中,而不是Web根目录。 这里是我的各种configuration文件的摘录: config.ru : map Dashboard::Application.config.relative_url_root || "/" do run Rails.application end environments / production.rb : config.relative_url_root = "/dashboard" config.assets.prefix = "/dashboard/assets/" nginx.conf : location /dashboard/ { root /srv/XXX/dashboard/public; location /dashboard/assets/ { gzip_static on; expires max; add_header Cache-Control public; } try_files $uri @unicorn; error_page 500 502 503 504 /500.html; client_max_body_size […]

Nginx返回504错误

我在我的Ubuntu服务器上从Nginx获得了一个504错误,我正在运行使用Unicorn的Rails。 当我查看Nginx的error.log.1时,我看到: 2014/01/21 18:06:02 [error] 698#0: *2 connect() failed (111: Connection refused) while connecting to upstream… 当我试图在Rails production.log中查看时,服务器返回Killed当我尝试重新启动Unicorn时,我得到master failed to start, check stderr log for details 当我运行df -h我得到: Filesystem Size Used Avail Use% Mounted on /dev/vda 20G 4.1G 15G 22% / 当我运行df -i我得到: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/vda 1310720 144242 1166478 12% […]

Redhat戒烟过程永远不会总是要杀死它

我正在创build一个独angular兽进程的RedHat服务器上工作。 我有两套正在创build的这些进程。 我可以退出过程中的一个罚款,一遍又一遍地创build它并退出。 我能够创build的另一个进程,但我不能退出它。 我必须像这样发送KILL命令。 kill -9 [process] 别人告诉我,你只应该杀一个人,作为最后的手段。 如果这个过程挂了或者类似的东西。 由于这是一个通过独angular兽的脚本化过程,所以杀死它可能并不聪明。 问题是我怎样才能debugging为什么这些进程之一不能够退出,而是总是需要的KILL命令。 另外这两个进程是通过脚本使用RAILS_ENVvariables创build的。 所以我假设他们正在创造相同的所有权和所有这一切。 我做了validation所有权和权限都看起来一样。 任何帮助将是很好的跟踪下来。 目前我试图使用Strace没有运气。

独angular兽在USR2上以相同的PID重新启动

最近我们将Rails应用程序迁移到了MRI 2.2.0(可能与此无关),我们遇到了Unicorn零宕机重启的问题。 当我发送USR2信号到主进程(在本例中是PID 19216)时,我在独angular兽日志中得到以下信息: I, [2015-03-11T23:47:33.992274 #6848] INFO — : executing ["/srv/ourapp/shared/bundle/ruby/2.2.0/bin/unicorn", "/srv/ourapp/current/config.ru", "-Dc", "/srv/ourapp/shared/config/unicorn.rb", {10=>#<Kgio::UNIXServer:/srv/ourapp/shared/sockets/unicorn.sock>}] (in /srv/ourapp/releases/a0e8b5df474ad5129200654f92a76af00a750f47) I, [2015-03-11T23:47:36.504235 #6848] INFO — : inherited addr=/srv/ourapp/shared/sockets/unicorn.sock fd=10 /srv/ourapp/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.1/lib/unicorn/http_server.rb:206:in `pid=': Already running on PID:19216 (or pid=/srv/ourapp/shared/pids/unicorn.pid is stale) (ArgumentError) from /srv/ourapp/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.1/lib/unicorn/http_server.rb:134:in `start' from /srv/ourapp/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.1/bin/unicorn:126:in `<top (required)>' from /srv/ourapp/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load' from /srv/ourapp/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>' E, [2015-03-11T23:47:36.519549 #19216] ERROR […]

请求archive.zip时,Gitlabredirect循环

我已经使用nginx作为Arch机器上的Web服务器设置了一个Gitlab实例。 我已经采取的步骤是在Arch Wiki上 。 除了每个项目页面上的下载archive.zipbutton之外,一切正在运行:当我单击该button时,我正在进入无限redirect循环。 我没有使用https或任何非标准的安装程序,没有一个日志似乎给了我有用的故障排除方法。 production.log重复: Started GET "/tdubois/Wafer-CPC/repository/archive.zip" for 131.170.94.23 at 2015-09-02 14:11:31 +1000 Processing by Projects::RepositoriesController#archive as ZIP Parameters: {"namespace_id"=>"tdubois", "project_id"=>"Wafer-CPC"} Redirected to http://domain.edu.au/tdubois/Wafer-CPC/repository/archive.zip Completed 302 Found in 5020ms (ActiveRecord: 2.0ms) sidekiq.log重复: 2015-09-02T04:11:31.059Z 31495 TID-1n7fko RepositoryArchiveWorker JID-60d166f32ebd28ba6c591547 INFO: start 2015-09-02T04:11:31.064Z 31495 TID-1n7fko RepositoryArchiveWorker JID-60d166f32ebd28ba6c591547 INFO: done: 0.005 sec nginx访问日志重复: 131.170.94.23 – – […]