This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by cwong]

I have read in some of the powerbuilder newsgroups that there are problems
with memory leak. My application runs 24 hours a day and has many users. The
application server has 512Megs of RAM. We are considering increasing that to
1GIG because we keep getting an out of memory error message. Your book says
that the Web.PB cgi program is a memory hog. I have tried to use the
Pbisa60.dll but I can't get it to work on our web server. Even though it is
IIS on an NT machine.
But we aren't getting the out of memory message on the web server , it is on
the application server. I have made sure that my application does a Destroy
for every Create. Although I couldn't find a Create for my NVO and it does not
have AutoInstantiate checked. I followed the example in your book for creating
this NVO. PB6.5 is supposed to have automatic garbagecollection. I'm worried
that perhaps the instances of my NVO are not being cleaned up. Should I put a
Destroy or explicit garbagecollection call in the Connectionend script of my
application?

Thanks for all your help. This forum and your book have been invaluable.

Catherine
import-bot (20211) [Avatar] Offline
#2
Re: Out of Memory?
[Originally posted by johnlatham]

> I've also got a problem with my application slowly eating all of the memory on
> an NT server. I am using IIS as the web server and ISAPI as the interface.
> I've had a look at the memory management help that comes with PB and it is as
> useful as "destroy objects before their instance variables go out of scope".
> I've done this. It doesn't help.
> I'd like to add my plea for help in tracking down memory leakage. Incidentaly,
> the IIS installation on the server keeps dying (Dr Watson error) on
> application inetinfo.exe. I suspect this is due to the memory problems of PB
> but would like to hear if anyone has any other explanations.
> Thanks.
I forgot to add that my applications connection log shows a worrying amount of
'System Error 1004 - Null object reference'. I can't see a reason for this but
suspect that it is involved in the memory leaking.
import-bot (20211) [Avatar] Offline
#3
Re: Out of Memory?
[Originally posted by johnlatham]

I've also got a problem with my application slowly eating all of the memory on
an NT server. I am using IIS as the web server and ISAPI as the interface.
I've had a look at the memory management help that comes with PB and it is as
useful as "destroy objects before their instance variables go out of scope".
I've done this. It doesn't help.
I'd like to add my plea for help in tracking down memory leakage. Incidentaly,
the IIS installation on the server keeps dying (Dr Watson error) on
application inetinfo.exe. I suspect this is due to the memory problems of PB
but would like to hear if anyone has any other explanations.
Thanks.
import-bot (20211) [Avatar] Offline
#4
Re: Out of Memory?
[Originally posted by mckan]

> I have read in some of the powerbuilder newsgroups that there are problems
> with memory leak. My application runs 24 hours a day and has many users. The
> application server has 512Megs of RAM. We are considering increasing that to
> 1GIG because we keep getting an out of memory error message. Your book says
> that the Web.PB cgi program is a memory hog. I have tried to use the
> Pbisa60.dll but I can't get it to work on our web server. Even though it is
> IIS on an NT machine.
> But we aren't getting the out of memory message on the web server , it is on
> the application server. I have made sure that my application does a Destroy
> for every Create. Although I couldn't find a Create for my NVO and it does not
> have AutoInstantiate checked. I followed the example in your book for creating
> this NVO. PB6.5 is supposed to have automatic garbagecollection. I'm worried
> that perhaps the instances of my NVO are not being cleaned up. Should I put a
> Destroy or explicit garbagecollection call in the Connectionend script of my
> application?
>
> Thanks for all your help. This forum and your book have been invaluable.
>
> Catherine
import-bot (20211) [Avatar] Offline
#5
Re: Out of Memory?
[Originally posted by johnlatham]

> > I've also got a problem with my application slowly eating all of the
memory on
> > an NT server. I am using IIS as the web server and ISAPI as the interface.
> > I've had a look at the memory management help that comes with PB and it is
as
> > useful as "destroy objects before their instance variables go out of scope".
> > I've done this. It doesn't help.
> > I'd like to add my plea for help in tracking down memory leakage.
Incidentaly,
> > the IIS installation on the server keeps dying (Dr Watson error) on
> > application inetinfo.exe. I suspect this is due to the memory problems of PB
> > but would like to hear if anyone has any other explanations.
> > Thanks.
> I forgot to add that my applications connection log shows a worrying amount of
> 'System Error 1004 - Null object reference'. I can't see a reason for this but
> suspect that it is involved in the memory leaking.
After further investigation I found the reason for the System Error 1004 and
eliminated it (the application was trying to destroy a transaction object that
did not exist). This has not helped with the memory leakage problem though.
import-bot (20211) [Avatar] Offline
#6
Re: Out of Memory?
[Originally posted by cwong]

I am still getting the out of memory error. I have tried adding an explicit
garbage collect() in the connectionend script of my application but it doesn't
make a difference. I would add a destroy statement but I'm not sure what to
reference to destroy my NVO. When I turn on the performance monitor I can see
that the page file bytes for the application and the % committed in use for
memory is always increasing. Once it reaches a certain threshold then the
application dies. We have almost 20,000 students and this application is used
by them to order tickets for sporting events. So there will be days when there
is a constant flow of users. Right now I am having to baby sit the application
and restart it as soon as it dies which is about once every 2 hours. On
weekends when use decreases the application lasts about 1/2 a day. I have
searched several the powersoft newsgroups and all though everyone talks about
memory leaks no one really offers any viable solutions. I like powerbuilder
and would like to do more development with it but if one application needs so
much memory I don't see how I could add any others to the same machine. I hope
that I have just overlooked something. Any help is greatly appreciated.

Catherine


> I have read in some of the powerbuilder newsgroups that there are problems
> with memory leak. My application runs 24 hours a day and has many users. The
> application server has 512Megs of RAM. We are considering increasing that to
> 1GIG because we keep getting an out of memory error message. Your book says
> that the Web.PB cgi program is a memory hog. I have tried to use the
> Pbisa60.dll but I can't get it to work on our web server. Even though it is
> IIS on an NT machine.
> But we aren't getting the out of memory message on the web server , it is on
> the application server. I have made sure that my application does a Destroy
> for every Create. Although I couldn't find a Create for my NVO and it does not
> have AutoInstantiate checked. I followed the example in your book for creating
> this NVO. PB6.5 is supposed to have automatic garbagecollection. I'm worried
> that perhaps the instances of my NVO are not being cleaned up. Should I put a
> Destroy or explicit garbagecollection call in the Connectionend script of my
> application?
>
> Thanks for all your help. This forum and your book have been invaluable.
>
> Catherine
import-bot (20211) [Avatar] Offline
#7
Re: Out of Memory?
[Originally posted by johnlatham]

> I've just been looking into the memory leakage and found something really
> strange. With Task Manager running I went throught the process of using my
> application and saw the memory usage increase from about 9000K to 34000K. I
> then minimised the 'w_listen' window and the memory usage dropped to about
> 1000K. On maximising the window again the usage went up to about 2500K.
> Do you get the same symptoms Catherine?
> I'm going to start looking into what happens during a minimise to see if this
> can be incorporated somewhere in the code.
I think I've found the reason for the application not freeing up memory. It is
the
SharedObjectGet statement in the connection_begin event script of the
application_server. With this commented out(and other references to the gnv_log
object comented) the application appears to behave itself.
import-bot (20211) [Avatar] Offline
#8
Re: Out of Memory?
[Originally posted by johnlatham]

I've just been looking into the memory leakage and found something really
strange. With Task Manager running I went throught the process of using my
application and saw the memory usage increase from about 9000K to 34000K. I
then minimised the 'w_listen' window and the memory usage dropped to about
1000K. On maximising the window again the usage went up to about 2500K.
Do you get the same symptoms Catherine?
I'm going to start looking into what happens during a minimise to see if this
can be incorporated somewhere in the code.
import-bot (20211) [Avatar] Offline
#9
Re: Out of Memory? - Solution
[Originally posted by johnlatham]

I've just found someone else in my organisation who was using PB 6.5.
By migrating my application from 6.0 to 6.5 the problem was solved!
Now all I've got to worry about is the license.
import-bot (20211) [Avatar] Offline
#10
Re: Out of Memory?
[Originally posted by cwong]

I am currently using Powerbuilder 6.5. Minimizing my window didn't have any
affect on memory usage but commenting out the SharedObjectGet made all the
difference. Thanks. Since garbage collection does not work with shared objects
the memory was not being freed until the unregister function call when the
server is stopped. I am going to try to write a log out to a file instead. I
would still like to have some kind of visual verification that my application
is working. Does anyone have any ideas? Does powerbuilder have any graphic
capabilities? For now I am using the NT performance monitor.

Catherine

> > I've just been looking into the memory leakage and found something really
> > strange. With Task Manager running I went throught the process of using my
> > application and saw the memory usage increase from about 9000K to 34000K. I
> > then minimised the 'w_listen' window and the memory usage dropped to about
> > 1000K. On maximising the window again the usage went up to about 2500K.
> > Do you get the same symptoms Catherine?
> > I'm going to start looking into what happens during a minimise to see if
this
> > can be incorporated somewhere in the code.
> I think I've found the reason for the application not freeing up memory. It is
> the
> SharedObjectGet statement in the connection_begin event script of the
> application_server. With this commented out(and other references to the
gnv_log
> object comented) the application appears to behave itself.
import-bot (20211) [Avatar] Offline
#11
Re: Out of Memory? - Solution
[Originally posted by johnlatham]

> I've just found someone else in my organisation who was using PB 6.5.
> By migrating my application from 6.0 to 6.5 the problem was solved!
> Now all I've got to worry about is the license.
Having moved the application to client site, and migrating to 6.5, I have
moved from using CGI to ISAPI. The problem of memory leakage is back!
I'm still getting the strange behaviour of the memory being released back to
the system by minimising the application window. How can minimising the
application free up over 30MB of memory?
import-bot (20211) [Avatar] Offline
#12
Re: Out of Memory? - Solution
[Originally posted by mckan]

Hi, John,

In the previous post, I found that you have resolved the problem by removing
the shareobject codes. Can it really work? I found the memory of my
application growing gradually, even that I didn't 'user' (connect) it, the
occupied memory still cannot decrease.
Is there anyone find the reason?

Peter



> > I've just found someone else in my organisation who was using PB 6.5.
> > By migrating my application from 6.0 to 6.5 the problem was solved!
> > Now all I've got to worry about is the license.
> Having moved the application to client site, and migrating to 6.5, I have
> moved from using CGI to ISAPI. The problem of memory leakage is back!
> I'm still getting the strange behaviour of the memory being released back to
> the system by minimising the application window. How can minimising the
> application free up over 30MB of memory?