Memory leakage

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Memory leakage

Postby eclipse » Fri Sep 21, 2012 10:26 am

Hi, I was wondering if it is normal for BA to exhibit an increase in memory usage over time, I have a number of examples of BA running on a server and when I first open them, memory usage is about 180 Mb each but after 24 hours they are all over 300Mb with one close to 400Mb. Obviously my memory has a finite limit, is it better to close and open BA each day? Would prefer not to have to do this. Any thoughts appreciated.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Fri Sep 21, 2012 1:34 pm

Not a memory leak as such, but if the same market is being monitored up to 5 hours then it will increase usage as it stores price history for the charts. You can change the setting in general preferences to store 0 hours price history if you don't need them. The default setting is 5 hours. If you do this then I would not expect it to increase and I will investigate as a memory leak.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby eclipse » Fri Sep 21, 2012 1:38 pm

Thanks Gary, I always set chart history to 0 by default as I don't use them, I do have the last market of the day being logged with a 120 second refresh rate until the following morning when it will reload the days racing, perhaps this is the problem.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Fri Sep 21, 2012 1:48 pm

That shouldn't cause an issue. I will investigate.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Castillo » Sat Sep 22, 2012 9:23 am

GaryRussell wrote:
Castillo wrote:
GaryRussell wrote:Can you confirm if this problem was appearing just after starting the application or had it been running continuously since the previous day?

Hi Gary

I may have found what was causing the problem. I’m back to using the latest Beta Version 1.1.0.66x80. What I’ve noticed is with Task Manager open (So I can evaluate the memory used) and then refreshing markets in BA the memory fluctuation for example can range from 110,000K to 300,000K. However following a market refresh BA sometimes does not return to 110,000K but remain at the higher memory used rate. So following further market refreshes it can push the memory BA uses up to the 800,000K / 900,000K mark which eventually caused the PC to run very short on Virtual Memory which is probably why I was getting the following error message and it was continuing to fail to load markets.

07:40:43:703: Error loading markets: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Betting_Assistant.MyTreeView.listMarketsThread() in C:\Betting Assistant Beta 1_1_0_66x68\Betfair Trading API Beta\MyTreeView.vb:line 218


So I’ve increased the Page file to hopefully overcome the problem.

Just to give you an example of tonight’s setup for BA and the memory readings from Task Manager.

Setup 7 Tabs linked to US racing and Excel. (Memory Usage approx 150,000K)
Setup an additional 12 Tabs linked to AUS racing and Excel, still showing 150,000K approx but after a market refresh the memory used is now showing 370,000K but after a few minutes it has reduced to 190,000K

Hopefully loading markets will not be an issue from now on.

Cheers
Castillo


Thanks. What you say backs up what I have found. It looks like there is a memory leak. I am pretty sure I know where the leak is now so I am going to plug it.


Hi Gary,

Did you manage to fix this memory leak?
As I've upgraded to a new PC, Intel i3, Windows 7, 8GB RAM and I'm still getting the above memory increases when refreshing the Market Tree.

Sorry but I may have not made myself clear in my earlier messages, it's when refreshing the Market Tree the memory used increases dramatically.

The version of BA I'm using is 1.1.0.66x82

Cheers
Castillo
Castillo
 
Posts: 346
Joined: Thu Mar 16, 2006 11:01 am

Postby GaryRussell » Sat Sep 22, 2012 10:22 am

Castillo wrote:
GaryRussell wrote:
Castillo wrote:
GaryRussell wrote:Can you confirm if this problem was appearing just after starting the application or had it been running continuously since the previous day?

Hi Gary

I may have found what was causing the problem. I’m back to using the latest Beta Version 1.1.0.66x80. What I’ve noticed is with Task Manager open (So I can evaluate the memory used) and then refreshing markets in BA the memory fluctuation for example can range from 110,000K to 300,000K. However following a market refresh BA sometimes does not return to 110,000K but remain at the higher memory used rate. So following further market refreshes it can push the memory BA uses up to the 800,000K / 900,000K mark which eventually caused the PC to run very short on Virtual Memory which is probably why I was getting the following error message and it was continuing to fail to load markets.

07:40:43:703: Error loading markets: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Betting_Assistant.MyTreeView.listMarketsThread() in C:\Betting Assistant Beta 1_1_0_66x68\Betfair Trading API Beta\MyTreeView.vb:line 218


So I’ve increased the Page file to hopefully overcome the problem.

Just to give you an example of tonight’s setup for BA and the memory readings from Task Manager.

Setup 7 Tabs linked to US racing and Excel. (Memory Usage approx 150,000K)
Setup an additional 12 Tabs linked to AUS racing and Excel, still showing 150,000K approx but after a market refresh the memory used is now showing 370,000K but after a few minutes it has reduced to 190,000K

Hopefully loading markets will not be an issue from now on.

Cheers
Castillo


Thanks. What you say backs up what I have found. It looks like there is a memory leak. I am pretty sure I know where the leak is now so I am going to plug it.


Hi Gary,

Did you manage to fix this memory leak?
As I've upgraded to a new PC, Intel i3, Windows 7, 8GB RAM and I'm still getting the above memory increases when refreshing the Market Tree.

Sorry but I may have not made myself clear in my earlier messages, it's when refreshing the Market Tree the memory used increases dramatically.

The version of BA I'm using is 1.1.0.66x82

Cheers
Castillo

Sorry, this hasn't been resolved. I will take another look at it.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby flogger » Sat Sep 22, 2012 8:04 pm

That's understandable though. Looking at this issue, it seems to be pretty complex. Would love to get some updates too.
Two For The Money Image
flogger
 
Posts: 41
Joined: Wed Sep 28, 2011 9:28 pm

Postby eclipse » Tue Sep 25, 2012 12:12 pm

Yes definitely when refreshing the market tree, had just opened BA and did a refresh and memory usage jumped from 139Mb to 276Mb.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby eclipse » Fri Dec 07, 2012 12:13 pm

Did you have any joy with this Gary?
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Fri Dec 07, 2012 12:40 pm

Sorry still looking into it. It's a tricky one to solve, but I will solve it.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby NorthView » Sun Apr 27, 2014 10:46 am

I'm having the same problem now that I automatically reload the new day's racing every morning.

On the first day BA would take the usual couple of hundred MB, but now, after running for 3 days, it's taking 1.2GB.

I have it set to record 0 hours of chart history.

I'm going on holiday soon and need this to be running automatically while I'm away, so I'd appreciate a resolution before then.

version 1.1.0.66x85

Thanks.
NorthView
 
Posts: 174
Joined: Wed Oct 08, 2008 12:33 pm
Location: London

Postby NorthView » Mon Apr 28, 2014 7:48 am

After loading today's races, it's now using 1.9GB of RAM.
NorthView
 
Posts: 174
Joined: Wed Oct 08, 2008 12:33 pm
Location: London

Postby Captain Sensible » Tue Apr 29, 2014 12:56 pm

Yes I've noticed in the past that BA does seem to increase it's memory usage if refreshed and new markets are added, I'm guessing it's storing previous market data rather than dumping it and reloading a completely new set.
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Tue Apr 29, 2014 12:59 pm

1.9GB is high though are you firing loads of bets etc ie transaction log building unreasonably high and are you sure it's BA that's taking the memory that high and not excel? I suppose alot will depend on what your sheet's doing, if it's logging bets/results etc as those checks are bound to add up to any overheads on old data
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby NorthView » Fri May 02, 2014 9:10 pm

Thanks for your thoughts, CS.

I've created a new thread in the Bugs section, because I can't think of any reason why BA would increase its memory usage so much each day.

The strange is, I'm not actually placing bets, just monitoring markets and recording prices.
NorthView
 
Posts: 174
Joined: Wed Oct 08, 2008 12:33 pm
Location: London


Return to Discussion

Who is online

Users browsing this forum: No registered users and 74 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.