Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
listen 8080 # TCP listen "tmp/unicorn.sock" # Unix Domain Socketã®ã¤ãã ã¨æå®ããã¨ãããªListenã®æ¹æ³ãªããã¼ãã¨æããã I, [2013-06-26T09:22:21.178723 #11457] INFO -- : listening on addr=0.0.0.0:8080 fd=8 F, [2013-06-26T09:22:21.179525 #11457] FATAL -- : error adding listener addr=tmp/unicorn.sock /u/apps/..../gems/unicorn-4.6.2/lib/unicorn/socket_helper.rb:149:in `bind_listen': Don't know how to bind: tmp/unicorn.sock
Capistrano3 + Rails4 + Unicorn + Nginx + EC2ã§ãµã¼ãã¼æ§ç¯ï¼RubyRailsnginxCapistrano *è¿½è¨ 2015/8/14 Rubyã¨Railsãææ°ãã¼ã¸ã§ã³ã«å¤æ´ãã¾ããã(åä½ç¢ºèªæ¸ã¿) unicornãèµ·åããªãåé¡ããã£ãã®ã§è¿½å ãã¾ããã(ãã£ã¬ã¯ããªã®ä½æãå¿ã) åãããããããã«ç»åã追å ãã¾ããã ã³ãã³ãã®ééããä¿®æ£ãã¾ããã ã¿ãªãããããã«ã¡ã¯ãä½éã§ãã ä»åã¯Railsã§æ¬çªç°å¢ã¸ãããã¤ããéãåãã¦ã§ãã£ã±ãåãããããã£ãç¹ãå¤ãã£ãã®ã§ã¿ãªããã¨å ±æãããã¨æãã¾ãã ã¾ã æªçãªã®ã§ééã£ã¦ããç¹ãªã©ãããã°ãææããã ããã¨å¹¸ãã§ãã æ¦è¦ ECï¼ã¸ãããã¤ããã¨ããããç¹ããã¾ã§ã æ å ±ããã©ãã©ã§èª¿ã¹ãã®ã«ããªãæéãåããã¦ãã¾ã£ãã®ã§ãä¸é£ã®æµããã¾ã¨ãã¾ããã ãã®ããã°ã®å¯¾è±¡è
March 02, 2013 ãHeroku ã§ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã Uniron (or Puma, etc) ã«ãããnåéããªã£ãã!ãã¿ãããªè©±ããã¾ã«è¦æãã¾ãããæ¬å½ãªãã§ãããããå®é¨ãã¦ã¿ã¾ãããã ãã¹ãç°å¢ Funtoo Linux x86-64bit Ruby 2.0.0-p0 Thin 1.5.0 Unicorn 4.6.2 Rainbows! 4.5.0 Puma 1.6.3 ã¢ããªã±ã¼ã·ã§ã³ã¯ Rack ã§ã50msec ã® sleep ã®å¾ã« 500KB ã®ã¬ã¹ãã³ã¹ãè¿ãã¾ããåãµã¼ãã«å¯¾ãã¦100åã®ãªã¯ã¨ã¹ãããåææ¥ç¶æ°ã 1-20 ã®éã§å¤ãã¤ã¤æãã¾ããã詳ããã¯ã½ã¼ã¹ãè¦ã¦ãã ããã (å¡ä¾ã® c 㯠concurrencyãåææ¥ç¶æ°ã§ã) ã¯ããã©ãè¦ã¦ã Thin ã¯é ãã§ããã¾ã£ããã¹ã±ã¼ã«ãã¾ãããæ¬å½ã«ãããã¨ããããã¾ããã ã
æè¿PHPãã¿ã°ããã ã£ãã®ã§ãé å¼µã£ã¦Railsã«ã¤ãã¦æ¸ãã¦ã¿ã¾ãã Railsã§ã¯ããã©ã«ãã§WEBrickãèµ·åãã¾ãããä½éãªã®ã§æ¬çªéç¨ã«ã¯åããªãã¨ããã¦ãã¾ãã WEB+DB PRESS Vol.70 WEB+DB PRESS vol.70ã§Railsé«éåã¨ãã¦Unicornãç´¹ä»ããã¦ãã¾ãã æ®æ®µRailsã§éçºããã¨ãã¯herokuã使ã£ã¦ããã®ã§ herokuã§Unicornã使ã£ã¦ã¿ããã¨æãã¾ãã heroku ps ãç¢ºèª ã¾ãã¯herokuã§ç¾å¨ä½¿ããã¦ããWebãµã¼ãã¼ã確èªãã¾ãã $ heroku ps herokuã®ããã©ã«ãã¯thinãªã®ã§ããããï¼ï¼ 以ä¸ãUnicornã®ã¤ã³ã¹ãã¼ã«ãé²ãã¦ããã¾ãã Gemfileã«è¿½å gem 'unicorn' config/unicorn.rbãä½æ ã¨ããããè¨å®å 容ã¯ä¸è¨ã«ãã¾ããã 詳ãããã¨ã¯
æ¬è¨äºã¯è±èªçããã°ã§å ¬éãããè¨äºã®ç¿»è¨³çã§ãã 2013å¹´7æã«ãç±³å½ãããµã¹å·ãªã¼ã¹ãã£ã³ã§éå¬ãããLonestar Ruby Conferenceã§ãRubyã«ããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¼ã«ã¤ãã¦ã話ããã¦ããã ãã¾ããããã®ä¸ã§ããã¤ãã®Rubyã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¼ã®ããã©ã¼ãã³ã¹ãããã¾ãã¾ãªç¶æ³ã«ãããæåã®éããæ¯è¼ãã¾ããããã®è¨äºã§ã¯ãè¬æ¼æºåã¨ãã¦è¡ã£ããªãµã¼ãã®ä¸ã§åãã£ããã¨ãããã¤ã¾ãã§ãç´¹ä»ãã¾ãã å®éã®ã«ã³ãã¡ã¬ã³ã¹ã®é²ç»ãã覧ã«ãªãããæ¹ã¯ãConfreaksã§å ¬éããã¦ãã¾ãã®ã§ãã¡ãããåç §ãã ããããã¹ãã«ä½¿ç¨ããç°¡åãªèªä½ã¢ããªã±ã¼ã·ã§ã³ã¯GitHubã«ãè¬æ¼ã¹ã©ã¤ãã¯Slideshareã«ããããå ¬éãã¦ãã¾ãã ãã®ãªãµã¼ãã¯ãPassenger 4ã®ããã©ã¼ãã³ã¹è©ä¾¡ä»¥å¤ãã¹ã¦2013å¹´7æã«è¡ã£ããã®ãªã®ã§ãæ å ±ãå¤å°å¤ããªã£ã¦ãã
Railsãµã¼ãã¼ã®Unicornã¯masterããã»ã¹ã«USR2ã·ã°ãã«ãéãã¨ãæ°ããè¨å®ã»ã¢ããªã®ãªãã¼ããç¡åæ¢ã§è¡ãgraceful restartãªåãããã¦ããã¾ãã ãã®ä»çµãç解ãã¦ãªãã£ãã®ã§ããã®ã¡ã¢ã ããã¥ã¡ã³ããä½ãè¦ã¦ãªãæã®èªè ç¾è¡ã®masterãæ°ããè¨å®ã»ã¢ããªããã¼ãããæ°masterããã»ã¹ãforkãã æ°masterã¨ããããçããworkerãreadyã«ãªã£ã¦ãæ°æ§ã®Unicornãå¦çãè¡ã é åããè¦ã¦æ§masterã¯åæã«è½ã¡ã ã¨æã£ã¦ããã ãã©ãå®é試ãã¦ã¿ã¦ã3ã®ã¿ã¤ãã³ã°ã«ãªã£ã¦ãæ§masterããªããªãè½ã¡ã¦ãããªãã æ§masterã®CPUå©ç¨çã¯ã ãã ãä¸ãã£ã¦ãã¦ããã®ã§ãããããªããªã£ããè½ã¡ãã®ãã¨åæã«æã£ã¦ããã©ããã§ããªããã¦ã¼ã³ã¨ãªã£ã¦ã¦ããã¥ã¡ã³ãè¦ããæ®éã«æ¸ãã¦ããã¾ããã USR2ãéã£ãæã®åã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}