El 10-07-2008, a las 12:17, Aparajita Fishman escribió:
I have a web system which uses Active4D 402 with 4D Server 2004.5
on Windows XP. I didn't design this, it just came to me....
Lucky you...
jajajajajajajajajajajajajajajaj
The thing is that as the users surf memory used by 4D (as shown at
the tasks manager in Windows XP) climbs slowly but permanently up
till 4D shows a Memory Full error.
Is anyone else having problems with memory usage? I did a test here
and saw that memory usage was very slowly climbing, but it wasn't a
conclusive test.
Active4D is badly used as every page calls a 4D method which
returns a blob that is send to the browser using set response buffer.
If every page is calling a 4D method to generate HTML, there is very
little point in using Active4D.
I know, but rewriting at this moment is not an option. It's obviously
planned for near future....
I checked my code to see if there is a possible leak when returning
a blob from a 4D method or when setting the response buffer, but I
couldn't see anything.
My first suggestion is to replace all of the calls to 'set response
buffer' to 'write blob', see if that has any effect.
In fact we used write blob in the beggining and changed it to set
response buffer to see the effect. No effect.
The calling chain is as follows:
(1) the a4d file calls a method in an a4l library
agenda.veragenda($textParam1;$textParam2;$textParam3;....)
(2) the method in the a4l library calls a 4D method
C_BLOB(vx_HTMLBlob)
C_BLOB(vx_Dummy)
$result := 4DMehod ($theParam1;$textParam2;...;->vx_HTMLBlob)
if($result =0)
set response buffer(vx_HTMLBlob;"text/html")
else
writebr("ERROR!!!")
End If
vx_HTMLBlob:=vx_Dummy
(3) 4DMethod receives a pointer to a blob (vx_HTMLBlob) in, say $9.
4DMethod does some stuff (not touching the blob) and calls 4DMethod2
($theParam1;$textParam2;...;$9).
(4) 4DMethod2 calls 4DMethod3 passing the pointer to the blob along.
(5) The final method in the chain finally fills the blob which is then
sent to the browser with set response buffer.
(6) vx_HTMLBlob is assigned a dummy empty blob at the end to clean it
from memory (that is not original code, I did it so as to test).
Do you see something that might be causing the problem?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoy.org
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/