Click here to Skip to main content
15,911,786 members
Home / Discussions / C#
   

C#

 
GeneralRe: Start with what Micorosft created for beginners Pin
T M Gray23-Jul-10 8:16
T M Gray23-Jul-10 8:16 
GeneralRe: Start with what Micorosft created for beginners Pin
PIEBALDconsult23-Jul-10 9:15
mvePIEBALDconsult23-Jul-10 9:15 
AnswerRe: Online cources for beginners Pin
Ravi Bhavnani23-Jul-10 13:20
professionalRavi Bhavnani23-Jul-10 13:20 
GeneralRe: Online cources for beginners Pin
eiel23-Jul-10 22:59
eiel23-Jul-10 22:59 
GeneralRe: Online cources for beginners Pin
PIEBALDconsult25-Jul-10 6:04
mvePIEBALDconsult25-Jul-10 6:04 
GeneralRe: Online cources for beginners Pin
Ravi Bhavnani25-Jul-10 7:09
professionalRavi Bhavnani25-Jul-10 7:09 
QuestionTwo questions on Application Version information Pin
Dewald23-Jul-10 1:10
Dewald23-Jul-10 1:10 
AnswerRe: Two questions on Application Version information Pin
Yusuf23-Jul-10 4:01
Yusuf23-Jul-10 4:01 
AnswerRe: Two questions on Application Version information Pin
PIEBALDconsult23-Jul-10 5:13
mvePIEBALDconsult23-Jul-10 5:13 
AnswerRe: Two questions on Application Version information Pin
David Skelly23-Jul-10 6:13
David Skelly23-Jul-10 6:13 
Questionreading and replacing the ini files using c# Pin
varsh1223-Jul-10 0:58
varsh1223-Jul-10 0:58 
AnswerRe: reading and replacing the ini files using c# Pin
OriginalGriff23-Jul-10 1:21
mveOriginalGriff23-Jul-10 1:21 
GeneralRe: reading and replacing the ini files using c# Pin
varsh1223-Jul-10 2:13
varsh1223-Jul-10 2:13 
GeneralRe: reading and replacing the ini files using c# Pin
varsh1223-Jul-10 2:17
varsh1223-Jul-10 2:17 
GeneralRe: reading and replacing the ini files using c# Pin
Luc Pattyn23-Jul-10 2:38
sitebuilderLuc Pattyn23-Jul-10 2:38 
AnswerRe: reading and replacing the ini files using c# Pin
PIEBALDconsult23-Jul-10 5:16
mvePIEBALDconsult23-Jul-10 5:16 
QuestionTriggering an event from another class? Pin
faheemnadeem23-Jul-10 0:54
faheemnadeem23-Jul-10 0:54 
AnswerRe: Triggering an event from another class? Pin
Samuel Cherinet23-Jul-10 3:23
Samuel Cherinet23-Jul-10 3:23 
AnswerRe: Triggering an event from another class? Pin
DaveyM6923-Jul-10 6:09
professionalDaveyM6923-Jul-10 6:09 
AnswerRe: Triggering an event from another class? Pin
faheemnadeem23-Jul-10 6:21
faheemnadeem23-Jul-10 6:21 
QuestionnHibernate Commit throws OutOfMemoryException Pin
spit_spit_spit_spit22-Jul-10 23:40
spit_spit_spit_spit22-Jul-10 23:40 
Hi,

I'm having a big problem with a "data importer" code.
I'm working on this data importer since January and never have any problem before. The big difference is just that there is more data to load now than in january. And each entity is bigger (more properties)

I'm using .NET 3.5 C# nHibernate & spring

The exception is:

Exception of type 'System.OutOfMemoryException' was thrown. ------- at System.Collections.Generic.Dictionary`2.Resize()
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at NHibernate.Event.Default.AbstractFlushingEventListener.PostFlush(ISessionImplementor session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at PagesJaunes.Adnc.DataAccess.Repositories.Repository`1.CommitTransaction()


There is a total of 500 000 entities to save.
My code is saving 10 000 entities, then commit and start a new transaction for the next 10 000
It take nearly 12 hours to save everything, and after ~400 000 entites i receive my OutOfMemoryException

I already try lots of things, can anyone help me having new ideas ?

- i tried to commit each 100 entites or each 1000 entites.
- i tried to call GC.Collect regularly
- if a commit throw the exception, i tried to rollback and start a new one. but then each commit throw the f** exception, no matter what.
- googling since 2 days and i can't find anything on this subject
- now i'm trying to do a commit/flush/clear each 10 000 entites (it's running i don't know the result yet)

--
Nicolas
AnswerRe: nHibernate Commit throws OutOfMemoryException Pin
Luc Pattyn23-Jul-10 2:50
sitebuilderLuc Pattyn23-Jul-10 2:50 
QuestionHow can i convert all types of files to pdf format without using any software? Pin
sush822-Jul-10 22:54
sush822-Jul-10 22:54 
JokeRe: How can i convert all types of files to pdf format without using any software? Pin
Łukasz Nowakowski22-Jul-10 23:05
Łukasz Nowakowski22-Jul-10 23:05 
GeneralRe: How can i convert all types of files to pdf format without using any software? Pin
sush822-Jul-10 23:26
sush822-Jul-10 23:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.