One notable change is that the page in question now makes an ajax call when it
loads. The response is data that is used in a jQuery Autocomplete lookup.
The method that handles that ajax request is this:
method "get_reviewer_json"
QUERY([People];[People]Is_BCR_Reviewer = TRUE)
$json := a4d.json.new
if(records in selection([People]) > 0)
ORDER BY([People];[People]Last_Name)
$map := new collection `a local collection
$map{"code"} := ->[People]Code
$map{"label"} := "concat(\", \"; [People]Last_Name;[People]First_Name)"
$map{"value"} := $map{"label"}
$json->addSelection(->[People]; "count"; "rows"; $map)
else
$json->add("count";0)
end if
$json->write
end method
I note a few things:
(1) I don't clear the collection, but I didn't do so because the docs state
"You may use this command on local collections, but there is usually not much
point as local collections are automatically cleared when script execution
ends."
(2) I didn't clear the selection, e.g., UNLOAD RECORD, REDUCE SELECTION after
running the query.
Have I overlooked anything else?
Thanks,
Brad
On 6/18/12 2:01 PM, "Perkins, Bradley D"
<[email protected]<mailto:[email protected]>> wrote:
We've been using this command for years and this problem only
surfaced recently. We haven't updated that plugin.
What did you change? Did the version of Active4D change?
We converted one of the old CGI based pages to Active4D and modified it to
support some new features.
We were already on the latest Active4D before this release.
Assuming this will show that we are leaking memory can you or others
recommend a way within a4D (or by calling 4D) to possibly capture where
we're leaking memory. Are there options besides AP Available Memory?
The best way is to use Instruments from Xcode.
I'm not familiar with that but I'll look into it. The good news is that
Instruments is installed on the server.
As far as 'top' is concerned, I think it shows we are leaking memory. The
script you provided lists the virtual memory used by 4D, correct?
I ran ab and requested a page that the google box might crawl. I did a
thousand requests per test and set top to refresh every 15 seconds. The
output below is the result of 3 or 4 tests, It appears to indicate VM is
increasing.
4D 2295M+
4D 2295M
4D 2295M
4D 2295M
4D 2295M
4D 2295M
4D 2295M
4D 2295M
4D 2295M
4D 2295M+
4D 2295M-
4D 2295M
4D 2296M+
4D 2297M+
4D 2297M-
4D 2298M+
4D 2299M+
4D 2300M+
4D 2300M
4D 2300M
4D 2300M
4D 2300M
4D 2300M
4D 2300M
4D 2308M+
4D 2308M
4D 2308M
4D 2318M+
4D 2319M+
4D 2319M
4D 2319M+
4D 2319M-
4D 2319M
4D 2319M
4D 2319M+
4D 2319M-
4D 2319M
4D 2319M
Thanks,
Brad
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]<mailto:[email protected]>
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
_______________________________________________
Active4D-dev mailing list
[email protected]<mailto:[email protected]>
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/