Jump to content
UBot Underground

Disabling Concurrent Garbage Collection


Recommended Posts

Hey guys,

 

I have a bot right now that utilizes ExBrowser and uses about 60-100 threads at a time on one machine. I am having great results with the bot for the most part. I have had it run successfully with 60 threads, 80, 100 threads and everything can be fine for a whole day or up to 3 days even at times, but other times I have it crashing after 1 hour, after 2 hours, even on lower threads like 40 or 45.

 

So I've done a lot of debugging because this bot does need to run for long periods of time and I cannot be constantly checking it to attend to it, and a crash is pretty disastrous...so basically after many many tests I've narrowed down the error to being specifically related to the .NET garbage collector and basically its a memory error. Now I am not sure if it's related to uBot, exbrowser, or the overall .NET garbage collector, but basically the solution is to disable concurrent garbage collection. The exception being given is an "ExecutionEngineException". If the garbage collector tries to move memory around during the compaction phase of a GC cycle and isn't able to move the memory or isn't able to correctly update the application pointers, it throws this error and crashes the bot.

 

So...I am not sure if any uBot devs / staff can share any thoughts on this or if anyone has any idea about ways to work around this by any chance...? I know the we can disable this by adding "<gcServer enable="true"/>"  to the .NET AppConfig for the bot but I am not sure how we would do that for uBot compiled scripts. By default it uses <gcConcurrent enabled="true"/>  which uses Concurrent Garbage Collection, and setting it to gcServer implicitly disables concurrent collection.

 

uBot staff / .NET developers around here, any thoughts?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...