Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: Memory Leak in 2.1.4? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 01 2011 at 21:03 | IP Logged Quote BeachBum

Dave, the macros nothing fancy. FYI here’s a copy of them:

insert into macroheader values ('READ_DIGITAL_INPUTS','Read DIs on WC Board',0,0,1);
insert into macrodetail values ('READ_DIGITAL_INPUTS',1,37,'',NULL,'Called by STARTUP macro, runs continuously.',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',2,26,'',NULL,'AGAIN',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',3,37,'',NULL,'Read digital input values from WC board and INVERT them for PH',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',4,38,'',0,'ph_setdigitalout("WC_DI1", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti1.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',5,38,'',0,'ph_setdigitalout("WC_DI2", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti2.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',6,38,'',0,'ph_setdigitalout("WC_DI3", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti3.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',7,38,'',0,'ph_setdigitalout("WC_DI4", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti4.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',8,38,'',0,'ph_setdigitalout("WC_DI5", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti5.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',9,38,'',0,'ph_setdigitalout("WC_DI6", if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti6.cgi" ),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',10,38,'',0,'ph_setdigitalout("WC_DI7" ,if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti7.cgi "),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',11,38,'',0,'ph_setdigitalout("WC_DI8" ,if(right(ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geti8.cgi "),1)="1",0,1))',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',12,37,'',NULL,'Read inputs again in 10 seconds',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',13,31,'',NULL,'10',0,'');
insert into macrodetail values ('READ_DIGITAL_INPUTS',14,27,'',NULL,'"AGAIN"',0,'');

*******************************************************

insert into macroheader values ('READ_ANALOG_INPUTS','VWS READ',0,0,1);
insert into macrodetail values ('READ_ANALOG_INPUTS',1,37,'',NULL,'Called by STARTUP macro, runs continuously.',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',2,26,'',NULL,'AGAIN',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',3,16,'',NULL,'if( {INTERNET FLAG}=0, 999, 1)',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',4,15,'[LOCAL1] ',NULL,'ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/index.cgi") ',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',5,37,'',NULL,'Read temperatures on WC board',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',6,38,'',0,'ph_setanalogout("WC_TEMP1", ph_regexsnap("Temperature 1-8 = \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',7,38,'',0,'ph_setanalogout("WC_TEMP2", ph_regexsnap("Temperature 1-8 = [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',8,38,'',0,'ph_setanalogout("WC_TEMP3", ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',9,38,'',0,'ph_setanalogout("WC_TEMP4", ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',10,38,'',0,'ph_setanalogout("WC_TEMP5" ,ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',11,38,'',0,'ph_setanalogout("WC_TEMP6" ,ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',12,38,'',0,'ph_setanalogout("WC_TEMP7" ,ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',13,38,'',0,'ph_setanalogout("WC_TEMP8" ,ph_regexsnap("Temperature 1-8 = [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* [0-9\.]* \([0-9\.]*\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',14,37,'',NULL,'Read Humidity value from WC board',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',15,38,'',0,'ph_setanalogout("WC_HUM",p h_regexsnap("Humidity = \([0-9][0-9 ]\)","[LOCAL1]",1,0))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',16,15,'[LOCAL2]',NULL,'ph_regexdiff("Digital Input 1-8 = ","$","[LOCAL1]",1,0)',1,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',17,37,'',NULL,'Read WC board analog inputs',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',18,38,'',0,'ph_setanalogout("WC_ANALOG 1",ph_regexsnap("\([0-9] +\)",ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geta1.cgi"),14 5,2))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',19,38,'',0,'ph_setanalogout("WC_ANALOG 2",ph_regexsnap("\([0-9] +\)",ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geta2.cgi"),14 5,2))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',20,38,'',0,'ph_setanalogout("WC_ANALOG 3",ph_regexsnap("\([0-9] +\)",ph_geturl(ph_getglobal_s("WC_ADDRESS")+"/geta3.cgi"),14 5,2))',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',21,37,'',NULL,'Check to see if Radiant or HW heaters are on or off and set their virtual X10 status',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',22,38,'',0,'if(number(ph_getanalog("WC _ANALOG1"))>200 and ph_getx10stat("RADIANT HW")=1,ph_x10btn("RADIANT HW",2,0),7)',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',23,38,'',0,'if(number(ph_getanalog("WC _ANALOG1"))<200 and ph_getx10stat("RADIANT HW")=2,ph_x10btn("RADIANT HW",3,0),7)',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',24,38,'',0,'if(number(ph_getanalog("WC _ANALOG2"))>200 and ph_getx10stat("DOMESTIC HW")=1,ph_x10btn("DOMESTIC HW",2,0),7)',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',25,38,'',0,'if(number(ph_getanalog("WC _ANALOG2"))<200 and ph_getx10stat("DOMESTIC HW")=2,ph_x10btn("DOMESTIC HW",3,0),7)',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',26,31,'',NULL,'10',0,'');
insert into macrodetail values ('READ_ANALOG_INPUTS',27,27,'',NULL,'"AGAIN"',0,'');


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 02 2011 at 12:28 | IP Logged Quote scottmi1

Pete, Dave,

Did some more testing this morning. I modified my READ_ANALOG_INPUTS macro so that it could either load the LOCAL1 variable via ph_geturl or from reading the contents from a file (there were also 3 other statements in the macro that invoked ph_geturl, but I clicked "skip" for them as they were too involved to modify).

I ran the macro about 10 times for each option and observed the memory usage with Task Manager. With ph_geturl the memory increase ranged from 20-84K for each execution with an average increase of 34K. Reading from the file instead of using ph_geturl the memory increase ranged from 16-76K for each execution with an average increase of 44K. Not exactly what I expected.

So I tried another test. I ran another macro that checks to see if today is a holiday and then updates a single Global variable. Again the memory increased from 12-20K each time with an average of 16K.

One more test. I created a macro that simply had 10 Comment statements and ran it 10 times. It also showed an increase in memory for each execution of an average of 8K.

At this point it appears I'm experiencing a memory increase every time a macro is run in 2.1.4. I have no idea whether this situation is unique to my system. I'll be happy to export and send any of the above macros and test file.

Mike..





Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 02 2011 at 23:21 | IP Logged Quote BeachBum

OK, let me get back to basics. How are you getting to 214? 212-123-124 or 121 - 214 or 21b – 214?

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 02 2011 at 23:45 | IP Logged Quote scottmi1

Pete,

Here are the steps I followed:

1. did a fresh installation of 2.1.2 into c:\powerhome
2. unzipped 2.1.4 on top of 2.1.2
3. copied over database and powerhome.ini from existing 2.1b installation
4. ran phupg.exe to upgrade the database.

Mike..
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 02 2011 at 23:59 | IP Logged Quote BeachBum

Got it Mike… Another dumb question, have you made any changes to your page file ie: free hard drive space and its usage. Give me time and I’ll run out of ideas. This is got a be a simple solution that we are overlooking otherwise I would think others would have experienced it. When you go to Help-About what is your database version.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 03 2011 at 07:10 | IP Logged Quote scottmi1

No changes to the page file. DB version is 2.1.2.

Since this problem is apparently unique to me, I'm considering wiping out 2.1.4 and starting over. Any thoughts on how to do this as cleanly as possible e.g. at what points to reboot?

Mike..
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 03 2011 at 07:51 | IP Logged Quote BeachBum

I find cleaning PH is simple. Do the uninstall and then delete the Powerhome folder. I don’t recommend any registry cleaners except WinUtilities which does other cleanups too but that should not be necessary. Then go with the install. Just make sure you backup you db and ini and any updated or unique plug-ins. It sounds to me like there is a Rteng7 problem which installs with PH but I know nothing about how it works.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 04 2011 at 22:31 | IP Logged Quote dhoward

Scott,

Well thats definitely not the results I was expecting. I tried similar testing and I got an increase in memory but I minimized PowerHome and all the extra memory was released.

Perhaps a reinistall will make a difference. What Pete suggests is the best way to do it.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 05 2011 at 08:01 | IP Logged Quote scottmi1

Uninstalled the existing installation, deleted the c:\powerhome directory, rebooted, then reinstalled 2.1.4 and rebooted again. No joy. I'm still seeing the memory increases.

I am totally stumped as to why this may be happening. There's not much else running on this PC and 2.1b has been running flawlessly in this exact environment for a long time.

Mike..
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 05 2011 at 08:45 | IP Logged Quote BeachBum

Don’t sound like a memory leak anymore but more like a memory hog Just a long shot but have you tried bringing up the OS without startup files. MSCONFIG – check Selective startup and uncheck load startup items….

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 05 2011 at 10:39 | IP Logged Quote scottmi1

Pete,

I followed your suggestion and disabled all startups with MSCONFIG. Still experiencing memory increases every time the macros run in 2.1.4.

Mike..
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 05 2011 at 16:00 | IP Logged Quote scottmi1

First, I'd like to thank Pete (BeachBum) for all his time and help today. He really went above and beyond. Even though we didn't identify the problem, we went well beyond my level of PC expertise and I learned a great deal.

So Pete and I spent some time looking at this and we're both still scratching our heads. The one odd thing that we came across was the virtual memory as reported by Process Explorer. It's totally out of whack and we don't know why.



We looked at some other running programs and saw similar numbers for virtual size. We even tried turning off the page file and still got this. This would appear to be a problem with my Windows XP installation and PH 2.1.4 obviously does not like it. I guess the next step at this point is for me to reinstall Windows XP. Not sure when I will get to this, but I will report back when I do.

Mike..



Edited by scottmi1 - December 05 2011 at 16:05
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
scottmi1
Groupie
Groupie
Avatar

Joined: July 11 2006
Location: United States
Online Status: Offline
Posts: 60
Posted: December 08 2011 at 12:33 | IP Logged Quote scottmi1

BeachBum and I have continued to work on this and I think we are making some progress. First, the huge number for virtual size in my last post turns out to be a bug in Process Explorer. Next, BeachBum was able to replicate the memory increase on one of his PCs so we know this problem is not due to my particular installation of PH 2.1.4.

I made the changes to ph_geturl that Dave suggested in a previous post in one of my "never ending" macros. When I used ph_geturl1("myurl",0,20) I continued to see the memory increase on each iteration. When I changed it to ph_geturl1("myurl",1,20) I no longer saw the memory increase for each iteration. However, I now see the memory increase by 12K about every 30 seconds (or around 3 iterations of the macro) while the macro is running. I'm still doing some testing to try and figure this out.

Here's the modified macro:

Code:
insert into macroheader values ('READ_DIGITAL_INPUTS_TEST','Read DIs on WC Board',0,0,1);
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',1,37,'',NULL,'Called by STARTUP macro, runs continuously.',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',2,26,'',NULL,'AGAIN',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',3,37,'',NULL,'Read digital input values from WC board and INVERT them for PH',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',4,38,'',0,'ph_setdigitalout("WC_ DI1",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 1.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',5,38,'',0,'ph_setdigitalout("WC_ DI2",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 2.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',6,38,'',0,'ph_setdigitalout("WC_ DI3",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 3.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',7,38,'',0,'ph_setdigitalout("WC_ DI4",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 4.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',8,38,'',0,'ph_setdigitalout("WC_ DI5",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 5.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',9,38,'',0,'ph_setdigitalout("WC_ DI6",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/geti 6.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',10,38,'',0,'ph_setdigitalout("WC _DI7",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/get i7.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',11,38,'',0,'ph_setdigitalout("WC _DI8",if(right(ph_geturl1(ph_getglobal_s("WC_ADDRESS")+"/get i8.cgi",1,20),1)="1",0,1))',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',12,37,'',NULL,'Read inputs again in 10 seconds',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',13,31,'',NULL,'10',0,'','');
insert into macrodetail values ('READ_DIGITAL_INPUTS_TEST',14,27,'',NULL,'"AGAIN"',0,'','') ;


Mike..
Back to Top View scottmi1's Profile Search for other posts by scottmi1
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 17 2011 at 20:18 | IP Logged Quote BeachBum

It appears that PH is acquiring storage and not releasing all when not used. But it may be also reusing that storage later. I don’t have a tool that tells me which is active but is apparent with I/O activity. On my operational system it started at 104 and grew to 236MB in a couple of days. But it is not growing now at the same pace. It has been averaging about 10 MBs per day. When I tested Mikes macro I never waited that long to see if it would stabilize. In Mikes findings it drove him to SOS (short on storage) . I find it difficult to drive my system to the limit. So I guess the question is whether there is a throttle valve or upper limit parameter in Sysbase or whoever that would control the usage. My current uptime is 4 days.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

<< Prev Page of 2
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum