Created
September 8, 2013 05:11
-
-
Save wilfrem/6482027 to your computer and use it in GitHub Desktop.
ServiceStack.OrmLite+MySQLのバグ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
多分、どっちが悪いってわけじゃないんだろうけど。。。 | |
ServiceStack.OrmLiteのautoDisposeConnectionをfalseにしてMySQLを使うと1日ぐらいでConnection must be valid and Openっていうエラーが出るようになります | |
これはどうもMySQLのConnectionはプーリングしてるといつの間にかClose?Dispose?するっぽくて(長時間アクセスなしが入るかも)、それで上記エラーが出るらしい。 | |
回避策としては常にOpenするようにしましょうとここには書いてある | |
http://bytes.com/topic/asp-net/answers/325128-system-invalidoperationexception-connection-must-valid-open | |
で、一方、ServiceStackはautoDisposeConnection=falseだと一度Openしたのは二度Openしないってのが入ってるので、いつの間にか死んでる接続につなぎに行ってエラーになる/(^o^)\ | |
多分trueにすると解決しそうなので、これから試す |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment