Last post May 10, 2010 05:22 AM by Nik24
Jun 30, 2009 09:03 AM|Nik24|LINK
I am facing a problem when the number of user to my web application increase, the application crashes and the error message displayed is: "ORA-12154: TNS: could not resolve service name".
This happens only when the users are uploading attachments, for some user it work well, for others it throws this error.
Jun 30, 2009 09:35 AM|mamun22s|LINK
Communication between Oracle server and application server is limited. I mean connection create by application server is fixed.
You said “when the number of user to my web application increase, the application crashes”
That means your application cant get connected with your oracle server due to connection shortage.
Now come to the solution.
The common reason for this is connection closing problem. I mean there might be some code that use the sql for insert/update/select delete but after that connection is not closed properly. So first u have checked all the code that all the connection
is closed properly after the db activities.
Jul 01, 2009 12:08 AM|Nik24|LINK
Hi mamun22s ,
Thanks for the accurate guidance; i agree that this could be one of the problems. But i am storing user(s) session in state server mode that is users sessions are stored in sql server database stored on the server. Can this cause the same problem?
If so: - I am not able to call the Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) in the Global.asax as If session mode is set to StateServer or SQLServer, the event is not raised., so
is there any work around to call this method in state server mode and close the connections.
Jul 01, 2009 01:41 AM|mamun22s|LINK
State server is not the problem I guess. Actually How you mange it is the main thing.
When a user login you get the information and set it to session and should close the connection. I don’t know what actually you are doing. You may review you code and care fully check whether the connection is closed properly. If you give me more detail
what you are doing then I will guide you properly.
Jul 01, 2009 10:02 PM|wmec|LINK
Nik, you can try in the PCs with the connection problem, if you can do this
May 10, 2010 05:22 AM|Nik24|LINK
Please follow these steps for resolving ORA-TNS Error
1. Make a file named TNSNAMES.ORA under c:\oracle\v9204\network\admin\ with
ifile = c:\oracle\network\tnsfile\TNSNAMES.ora content.
2. Make a file named TNSNAMES.ORA under c:\oracle\network\tnsfile\ with
(ADDRESS = (PROTOCOL = TCP)(HOST = ProductionServerName.net)(PORT = 1521))
(SID = OracleAccount )
(SERVER = DEDICATED)