Reputation: 4681
First of all, we have a MVC web application which uses NHibernate (version 3) and an Oracle 11g database.
The application is working, but when we publish in the production server a curious scenario happens:
ORA-12571: TNS:packet writer failure
exception.The first thing we tried to do was to isolate the problem, so we published the application into another server with the exactly same configuration:
And for our surprise we couldn't reproduce the problem.
Please, someone have a clue of what is going on?
Upvotes: 1
Views: 296
Reputation: 4681
The problem is related to the connection pool of the server's oracle client. It seems that it is delivering invalid connections to the web application, while in the other servers it does not happens.
The solution is not very interesting, but putting the Validate Connection = True
inside the connection string resolved the issue. I am aware of the performance penalty of this, but I am out of options.
PS: using this flag, each connection is validated by the connection pool service before delivering it for the client application. This is not very nice, since a database round-trip will happen for every connection request.
Upvotes: 1