<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>asdf</title>
	<link>http://yoonglory.egloos.com</link>
	<description>심심하다</description>
	<language>ko</language>
	<pubDate>Mon, 28 Jan 2008 06:45:50 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>asdf</title>
		<url>http://pds6.egloos.com/logo/200709/15/73/e0012673.png</url>
		<link>http://yoonglory.egloos.com</link>
		<width>77</width>
		<height>77</height>
		<description>심심하다</description>
	</image>
  	<item>
		<title><![CDATA[ Too many open files 에러 대처 방법 ]]> </title>
		<link>http://yoonglory.egloos.com/1348276</link>
		<guid>http://yoonglory.egloos.com/1348276</guid>
		<description>
			<![CDATA[ 
  1. ROR(Ruby on rails)로 서비스를 하고 세션데이터를 memcached에 저장한다.<br />
그런데 memcached에서 에러메세지를 내면서 로그가 풀나면서 저장소 용량 부족으로<br />
서버가 다운되었다.<br />
에러 내용은 accept(): Too many open files&nbsp; 이다.<br />
이럴 경우 운영체제 자체의 FD 사이즈를 늘려주어야 한다.<br />
<br />
~# ulimit -a<br />
<br />
core file size (blocks)&nbsp; 0<br />
data seg size (kbytes) &nbsp; unlimited<br />
file size (blocks) &nbsp; &nbsp; &nbsp; unlimited<br />
max memory size (kbytes) unlimited<br />
stack size (kbytes) &nbsp; &nbsp;&nbsp; 8192<br />
cpu time (seconds) &nbsp; &nbsp; &nbsp; unlimited<br />
max user processes &nbsp; &nbsp; &nbsp; 2048<br />
pipe size (512 bytes) &nbsp;&nbsp; 8<br />
open files &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1024<br />
virtual memory (kbytes)&nbsp; 2105343<br />
<br />
2. 현재 프로세스의 열린 파일 수(소켓포함)&nbsp; 는 아래의 명령어로 알아 볼 수 있다.<br />
~#&nbsp;lsof -p PID | wc -l<br />
<br />
<br />
3. 해결 방법<br />
(1)&nbsp; ~# ulimit -n 2048<br />
&nbsp;&nbsp;&nbsp; OR<font size="2"><strong style="font-weight: normal;"></strong><br />
(2) 리눅스환경을 기준으로 설명한다. truefeel 사용자의 open files개수를 4096(sort limit),<br />
6144(hard limit) 로 제한한다면 /etc/security/limits.conf에 다음 줄을 추가해주면 로긴시 적용된다.<br />
<br />
</font><table style="width: 461px; height: 49px;"><tbody><tr><td bgcolor="#f0f0f0"><font size="2">truefeel &nbsp; &nbsp; &nbsp; &nbsp; soft &nbsp; &nbsp;nofile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4096<br />
truefeel &nbsp; &nbsp; &nbsp; &nbsp; hard &nbsp; &nbsp;nofile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;6144</font></td></tr></tbody></table>나의 경우 첫번째 방법을 적용하였다.<br />
			 ]]> 
		</description>

		<comments>http://yoonglory.egloos.com/1348276#comments</comments>
		<pubDate>Mon, 28 Jan 2008 06:45:50 GMT</pubDate>
		<dc:creator>고리하</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Blog API를 이용해보자. ]]> </title>
		<link>http://yoonglory.egloos.com/915599</link>
		<guid>http://yoonglory.egloos.com/915599</guid>
		<description>
			<![CDATA[ 
  <p>This is posted by&nbsp;MS Live writer</p> <p><a href="http://pds7.egloos.com/pds/200710/26/73/e0012673_47214d2bb2bd2.jpg" atomicselection="true"><img style="border-width: 0px;" alt="1149542079" src="http://pds7.egloos.com/pds/200710/26/73/e0012673_47214d2c134bf.jpg" border="0" height="180" width="240"></a> </p> <p>&nbsp;귀여운것.</p>			 ]]> 
		</description>

		<comments>http://yoonglory.egloos.com/915599#comments</comments>
		<pubDate>Fri, 26 Oct 2007 02:13:00 GMT</pubDate>
		<dc:creator>고리하</dc:creator>
	</item>
	<item>
		<title><![CDATA[ ruby on rails 에서 session을 memcache에 저장할경우 주의 사항 ]]> </title>
		<link>http://yoonglory.egloos.com/876731</link>
		<guid>http://yoonglory.egloos.com/876731</guid>
		<description>
			<![CDATA[ 
  현재 ROR을 이용해서 서비스를 만들고 있습니다. 그런데 memcache를 사용하는 중 세션 정보가 유지되지 않아 그것을 해결하는데<br />
많은 시간을 소비하였습니다. 저의 경우 모델자체를 세션에 저장하였었는데 그것의 데이터가 많아지면 저절로 기존 데이터가 사라지는 것이었습니다. 그래서 필요한 데이터만 저장하니까 그러한 문제는 발생되지 않았습니다. 다른 사람들은 삽질하지 마시라고 올립니다.^^<br />
<br />
<br />
Reduce session data when use memcache on ruby on rails.<br />
			 ]]> 
		</description>

		<comments>http://yoonglory.egloos.com/876731#comments</comments>
		<pubDate>Tue, 16 Oct 2007 12:02:23 GMT</pubDate>
		<dc:creator>고리하</dc:creator>
	</item>
	<item>
		<title><![CDATA[ UC Berkeley 강의 ]]> </title>
		<link>http://yoonglory.egloos.com/827411</link>
		<guid>http://yoonglory.egloos.com/827411</guid>
		<description>
			<![CDATA[ 
  <p><br />
<embed src="http://www.youtube.com/v/Ka9IwHNvkfU" width="425" height="350" type="application/x-shockwave-flash" wmode="transparent"></embed><br />
<br />
<a title="" href="http://jp.youtube.com/profile_play_list?user=ucberkeley">여기</a>가면 여러가지 동영상을 볼 수 있습니다.<br />
전부 알아듣기는 힘들지만 들을만합니다. ^^			 ]]> 
		</description>

		<comments>http://yoonglory.egloos.com/827411#comments</comments>
		<pubDate>Thu, 04 Oct 2007 15:08:28 GMT</pubDate>
		<dc:creator>고리하</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 저도 이제 블로그 시작합니다. ]]> </title>
		<link>http://yoonglory.egloos.com/755584</link>
		<guid>http://yoonglory.egloos.com/755584</guid>
		<description>
			<![CDATA[ 
  앞으로 글 자주 올리도록 하겠습니다. 도메인도 샀습니다. ㅋㅋ<br />
yoonglory.egloos.com 은 언제 사라질지 모르기 때문에 <br />
www.iamglory.pe.kr 으로 들어와 주세요.<br />
			 ]]> 
		</description>

		<comments>http://yoonglory.egloos.com/755584#comments</comments>
		<pubDate>Sat, 15 Sep 2007 15:38:20 GMT</pubDate>
		<dc:creator>고리하</dc:creator>
	</item>
</channel>
</rss>
