본문 바로가기

Programming/ORM

Entity framework timeout

서버 구성에서 DB는 단독으로 운영하는 게 안정적일텐데.

Test환경이 충분하지 않아, WAS + Process + DB를 하나의 서버에 몰아 넣었더니...

Entity framework에서 connection timeout오류가 났습니다.


올려둔 Process가 한 번에 8개씩 돌면, CPU full은 기본이고 memory도 간당간당할 수준이라

어쩌면 충분히 예상했어야 했던 일인지도 모르겠네요.


동시에 실행할 Process 개수를 적당히 줄이는 게 모범 답안이겠지만,

일단 timeout 관련한 내용을 찾아봤습니다.


Default timeout value는 provider의 그것에 따릅니다.

(MS-SQL, MySQL의 경우 30sec)

이는 .Config 파일 및 source code 상에서 설정이 가능합니다.


App.Config

Connection Timeout=60; // 시간 단위는 '초(Sec)'입니다.


Source code


References
http://stackoverflow.com/questions/17049055/entity-framework-what-is-the-current-command-timeout-value


'Programming > ORM' 카테고리의 다른 글

MyBatis.Net pass value to using SQL's In clause  (0) 2015.12.03
iBatis vs. Hibernate 논쟁  (0) 2014.07.22
6.1 bug?  (0) 2014.07.22
enum support  (0) 2014.07.22
More faster!  (0) 2014.07.22