I'm running my website in an Azure VM, with a SQL Azure database. As far as I can tell, in Azure, you have to expect that the DB connection might not be super stable, and so far I've seen a "connection forceably closed" exception.
Since uCommerce uses NHibernate, I'm guessing that I would need to do something specific for that? Has anyone tried something like that?
I've found a NHibernate driver, that says it will handle it, but I'm not sure how that fits into a product where you do not handle the datalayer yourself: https://github.com/MRCollective/NHibernate.SqlAzure
Any tips and tricks appreciated :)
I've considered a dirty hack, being to catch all exceptions that contain "An existing connection was forcibly closed by the remote host", and then redirect the user to the current url, effectively making a ghetto style retry mechanism. But that just seems wrong...
Transient Fault Handling in Azure
I'm running my website in an Azure VM, with a SQL Azure database. As far as I can tell, in Azure, you have to expect that the DB connection might not be super stable, and so far I've seen a "connection forceably closed" exception.
According to this article, there are some application blocks that do transient fault handling: http://msdn.microsoft.com/en-us/library/hh680899%28v=pandp.50%29.aspx
Since uCommerce uses NHibernate, I'm guessing that I would need to do something specific for that? Has anyone tried something like that?
I've found a NHibernate driver, that says it will handle it, but I'm not sure how that fits into a product where you do not handle the datalayer yourself: https://github.com/MRCollective/NHibernate.SqlAzure
Any tips and tricks appreciated :)
I've considered a dirty hack, being to catch all exceptions that contain "An existing connection was forcibly closed by the remote host", and then redirect the user to the current url, effectively making a ghetto style retry mechanism. But that just seems wrong...
Hello Morten,
We are looking into adding the driver to the core.
Until then, you can substitute the ISessionProvider implementation of uCommerce with you own.
If you use dot peek to look at the existing implementation, it should be straight forward to do.
Kind regards,
Jesper
is working on a reply...