OracleException: Network error ???
OracleException: Network error ???
Hello.
I have been encounterd these errors when developing my apps but I don’t know why.
Errors…
CoreLab.Oracle.OracleException: Network error: 203
CoreLab.Oracle.OracleException: Network error: 204
CoreLab.Oracle.OracleException: Network error: 207
I used shared connection in direct mode and use below environments
Oracle 10g standard.
Oradirect 4.50
.net framework 2.0 in VS2005
Can I get some info about how to solve these problem?
Best regards.
Thank you.
I have been encounterd these errors when developing my apps but I don’t know why.
Errors…
CoreLab.Oracle.OracleException: Network error: 203
CoreLab.Oracle.OracleException: Network error: 204
CoreLab.Oracle.OracleException: Network error: 207
I used shared connection in direct mode and use below environments
Oracle 10g standard.
Oradirect 4.50
.net framework 2.0 in VS2005
Can I get some info about how to solve these problem?
Best regards.
Thank you.
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 23
- Joined: Fri 16 Nov 2007 20:10
- Location: Germany
Hello,
I just get the same errors on a Windows XP SP 2 against an Oracle 10.2 in Direct-Access-Mode. I'm using OraDirect 4.30.20.
The errors are sporadic but reproducable. Thy occur specially if I'm doing a lot of SELECT- and INSERT/UPDATE-commands (import-job) one-by-one. An earlyier version of this job was doing it in a single thread. This leads to one of the network errors after 10 to 20 commands. Now I get error 203 in most cases if I start my import job the first time. The application is crashing complete afterwards ! If I restart my app and retry the job, everything works fine!
By the way: I can't send you sample-code, because it is a huge multi-tier-app!
HTH
sprinter
I just get the same errors on a Windows XP SP 2 against an Oracle 10.2 in Direct-Access-Mode. I'm using OraDirect 4.30.20.
The errors are sporadic but reproducable. Thy occur specially if I'm doing a lot of SELECT- and INSERT/UPDATE-commands (import-job) one-by-one. An earlyier version of this job was doing it in a single thread. This leads to one of the network errors after 10 to 20 commands. Now I get error 203 in most cases if I start my import job the first time. The application is crashing complete afterwards ! If I restart my app and retry the job, everything works fine!
By the way: I can't send you sample-code, because it is a huge multi-tier-app!
HTH
sprinter
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 23
- Joined: Fri 16 Nov 2007 20:10
- Location: Germany
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 23
- Joined: Fri 16 Nov 2007 20:10
- Location: Germany
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
hello,
I am a co-worker of jkAhn.
First, I am very sorry for late reply.
As sprinter252 said, I think, too, that more frequently produced the problems in many commands are excuted at the same time.
(sometimes, It seems the problem occurs by just two heavy commands requesting blob/clob data)
It ouccured sporadic, and next time i tryed it works fine, too.
My apps used multi-threading in single session.
(we have to use single session for very busy server.)
Environments.
Client side
- OS : Win XP SP2
- Oradirect 4.50 (Direct-Access mode)
- .net Framework 2.0 in VS2005
Server side
- Oracle 10g standard (10.2.0.3.0)
- Redhat Linux 9.x
This is the stacktrace..
CoreLab.Oracle.OracleException
Message="Network error: 207"
Source="CoreLab.Oracle"
ErrorCode=-2147467259
Code=207
Offset=0
StackTrace:
Location: CoreLab.Oracle.OracleDataReader.Close()
Location: CoreLab.Oracle.OracleDataReader.Finalize()
And, below simple code produces errs sometimes.
Code:
tv_gsmmap_cdr / tb_workspace tables have blob/clob columns.
1. simpleButton1 click.
2. During process first command, simpleButton2 click.
3. I can meet the errors occasionally.(Network error: 203/204/207 or Unknown Error 1)
HTH and TIA.
Best regards.
Kim
I am a co-worker of jkAhn.
First, I am very sorry for late reply.
As sprinter252 said, I think, too, that more frequently produced the problems in many commands are excuted at the same time.
(sometimes, It seems the problem occurs by just two heavy commands requesting blob/clob data)
It ouccured sporadic, and next time i tryed it works fine, too.
My apps used multi-threading in single session.
(we have to use single session for very busy server.)
Environments.
Client side
- OS : Win XP SP2
- Oradirect 4.50 (Direct-Access mode)
- .net Framework 2.0 in VS2005
Server side
- Oracle 10g standard (10.2.0.3.0)
- Redhat Linux 9.x
This is the stacktrace..
CoreLab.Oracle.OracleException
Message="Network error: 207"
Source="CoreLab.Oracle"
ErrorCode=-2147467259
Code=207
Offset=0
StackTrace:
Location: CoreLab.Oracle.OracleDataReader.Close()
Location: CoreLab.Oracle.OracleDataReader.Finalize()
And, below simple code produces errs sometimes.
Code:
Code: Select all
(omitted using ...)
namespace Err {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
OracleConnection oc = new OracleConnection();
BackgroundWorker bw = new BackgroundWorker();
private void Form1_Load(object sender, EventArgs e){
oc.ConnectionString = "User Id=a;Password=a;Server=1.1.1.1;Direct=True;Sid=a;unicode=True;";
oc.Open();
bw.DoWork += new DoWorkEventHandler(bw_DoWork);
}
void bw_DoWork(object sender, DoWorkEventArgs e) {
OracleCommand cmd = oc.CreateCommand();
cmd.CommandText = " select * from tv_gsmmap_cdr ";
OracleDataReader odr = cmd.ExecuteReader();
OracleDataTable odt = new OracleDataTable();
odt.Load(odr); // <-- IDE point this line occured the err.
}
private void simpleButton1_Click(object sender, EventArgs e) {
bw.RunWorkerAsync();
}
private void simpleButton2_Click(object sender, EventArgs e) {
OracleCommand cmd = oc.CreateCommand();
cmd.CommandText = " select * from tb_workspace ";
OracleDataReader odr = cmd.ExecuteReader();
OracleDataTable odt = new OracleDataTable();
odt.Load(odr); // <-- this line occur err, too.
}
}
}
1. simpleButton1 click.
2. During process first command, simpleButton2 click.
3. I can meet the errors occasionally.(Network error: 203/204/207 or Unknown Error 1)
HTH and TIA.
Best regards.
Kim
Last edited by loveacs on Mon 17 Mar 2008 15:16, edited 1 time in total.
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
Your multithreaded application at the same time requires access to methods and components that are not thread safe.
OracleConnection is not thread safe.
Every thread requires it's own connection.
Put the methods logic between OracleConnection.Open() and OracleConnection.Close().
Also you might want to use connection pooling technology.
OracleConnection is not thread safe.
Every thread requires it's own connection.
Put the methods logic between OracleConnection.Open() and OracleConnection.Close().
Also you might want to use connection pooling technology.
-
- Posts: 9
- Joined: Wed 02 Apr 2008 03:14
Alexey,
I am experiencing Network Error 207s and 204s in my project, too. All calls to CoreLab objects occur on the main UI thread. There is only one connection that remains open during the entire sequence of events. The application is multi-threaded.
My project is a plug-in for Visual Studio. When the error occurs it completely wipes out the Visual Studio application. The error stack indicates that the exception occurs in the
I have been able to work around the exception by pausing the thread for 1 second before each call to OracleCmd.ExecuteReader(); i.e.This code is calling Oracle's DBMS_METADATA package: I am using parameter objects. The result set has a CLOB in it.
The OS the application runs on is Windows Vista Ultimate 64-bit, but it occurs on WinXP Pro SP2 32-bit as well. The database is Oracle 10g2 on a 64 bit Linux. I don't know the flavor of Linux but I can get it, if you need it. The errors occur with CoreLabs 4.30 and 4.50.
From what I've been able to gather the problem appears to be timing related, but I am only guessing. The problem gets worse when the application connects to the database through a VPN connection.
Can you help? The one second pause is a terrible kludge, and practically cripples our application. I have a small test application that can reproduce the problem on a VPN.
Thanks,
I am experiencing Network Error 207s and 204s in my project, too. All calls to CoreLab objects occur on the main UI thread. There is only one connection that remains open during the entire sequence of events. The application is multi-threaded.
My project is a plug-in for Visual Studio. When the error occurs it completely wipes out the Visual Studio application. The error stack indicates that the exception occurs in the
- CoreLabs.OracleData.OracleReader.Close();
CoreLabs.OracleData.OracleReader.Finish();
I have been able to work around the exception by pausing the thread for 1 second before each call to OracleCmd.ExecuteReader(); i.e.
Code: Select all
System.Threading.Thread.Sleep(1000);
OracleDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleResult);
Code: Select all
select DBMS_METADATA.GET_DDL('TABLE', 'MYTABLE', 'MYSCHEMA') from dual;
The OS the application runs on is Windows Vista Ultimate 64-bit, but it occurs on WinXP Pro SP2 32-bit as well. The database is Oracle 10g2 on a 64 bit Linux. I don't know the flavor of Linux but I can get it, if you need it. The errors occur with CoreLabs 4.30 and 4.50.
From what I've been able to gather the problem appears to be timing related, but I am only guessing. The problem gets worse when the application connects to the database through a VPN connection.
Can you help? The one second pause is a terrible kludge, and practically cripples our application. I have a small test application that can reproduce the problem on a VPN.
Thanks,
Last edited by DwightFowler on Wed 02 Apr 2008 18:07, edited 1 time in total.
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
Let me quote myselfThere is only one connection that remains open during the entire sequence of events. The application is multi-threaded.
I guess it's the same in the current project.Your multithreaded application at the same time requires access to methods and components that are not thread safe.
OracleConnection is not thread safe.
Every thread requires it's own connection.
Put the methods logic between OracleConnection.Open() and OracleConnection.Close().
Also you might want to use connection pooling technology.
Every thread must use a new connection.
Threads are like users for the server.
Simultaneously, threads are asking the server for some data,
and when the data is fetched they just got lost in the network packages.
Say a thread1 expected one data, but received some data for the thread2.
-
- Posts: 23
- Joined: Fri 16 Nov 2007 20:10
- Location: Germany
Hello Alexey
just one question. Would it be a solution to use blockings (mutexes or so)? In some cases it is not so simple to use new connections because of transaction-problems. I know, I can use the Transaction-context as a single object too, but sometimes I'm working on huge projects which I didn't created. So the question is: How would a CoreLab-connection react, if it was locked by a thread?
Thanks,
Alex
Thanks,
Alex
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 9
- Joined: Wed 02 Apr 2008 03:14
Multi-threading is not the issue
Alexey,
I think I did not state the condition clearly. While the application may be multi-threaded. ALL CALLS TO CORELAB OBJECTS OCCUR ON THE MAIN UI THREAD.
If you are implying that CoreLabs components cannot work in a multi-threaded environment, that's a different story, and something that we need to know. I hope you are not implying that, though.
Besides, I can reproduce the problem in a simple application, running only one thread.
I think I did not state the condition clearly. While the application may be multi-threaded. ALL CALLS TO CORELAB OBJECTS OCCUR ON THE MAIN UI THREAD.
If you are implying that CoreLabs components cannot work in a multi-threaded environment, that's a different story, and something that we need to know. I hope you are not implying that, though.
Besides, I can reproduce the problem in a simple application, running only one thread.