Strange memory behavior during bulk insert process

Strange memory behavior during bulk insert process

Postby [UnforgiveN] » Tue 10 Oct 2006 18:14

Hi!

We've got your answer about bulk insert with transactions and it work very funny.

But there is a strange memory behavior during this insert. We have a trace output line before ExecuteArray(int BulkDeep) command exactly. So we can see that memory usage growing up VERY awfull in the moment of executing.

For example we have a 1Mb file consited of 4000 records. I want to put these 4000 records into database with one array. And in the moment of executing we have memory usage about 600-1100Mb.

How can you explain this behaviour and what should I do for escape from this fail.

Thanks!
[UnforgiveN]
 
Posts: 5
Joined: Sat 30 Sep 2006 14:46

Postby Alexey » Wed 11 Oct 2006 11:20

Probably you have string parameters. For such parameters OraDirect allocates memory for max number of symbols. In this case you'll have to set OracleParameter.Size for needed maximum number of symbols in the string.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby [UnforgiveN] » Wed 11 Oct 2006 16:45

Ok, that's work and there was no memory peak at the moment of executing, we have stable line of memory usage at the Task Manager (near the 100Mb value) and there was no any memory leak.

But after about 1.5-2 hours of work we have an outOfMemoryException without any memory problem in fact.

Bulk array is about 4000 depth. Memory usage is stable about 500Mb (all processes combined) and the server has more than 4Gb of RAM

This problem disappeared after setting bulk array depth in 100 value (stable memory usage line near 30Mb), but it was detected at 500 bulk array depth (stable memory usage line near the 40 Mb value).

I see there was a similar problem with oraDirect here - http://crlab.com/forums/viewtopic.php?t ... utofmemory but there was no any public answer for this stuff.

Help us, please.
[UnforgiveN]
 
Posts: 5
Joined: Sat 30 Sep 2006 14:46

Postby Alexey » Thu 12 Oct 2006 13:59

Could you send us test project to reproduce the problem, including definition of your own database objects. Use e-mail address provided in the Readme file. Do not use third party components.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby [UnforgiveN] » Wed 18 Oct 2006 04:19

Hi again!

I have made the sample project and it fail in the way I wrote above. I send it as a letter attachment at oranet (at) crlab (dot) com with disclaimer but there was no any answer for me from last friday.
[UnforgiveN]
 
Posts: 5
Joined: Sat 30 Sep 2006 14:46

Postby Alexey » Wed 18 Oct 2006 08:51

We haven't received any letter from you. Please re-send it to me directly (AlexeyI at crlab dot com).
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby [UnforgiveN] » Wed 18 Oct 2006 09:44

Done!
[UnforgiveN]
 
Posts: 5
Joined: Sat 30 Sep 2006 14:46

Postby Alexey » Wed 18 Oct 2006 10:35

I've received your mail. Look forward to the feedback.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle