|
| [WD2X] Stored Procedures consumes a lot of memory |
| Iniciado por guest, 06,jul. 2016 09:09 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 06,julio 2016 - 09:09 |
Hi,
I have a stored procedure with a stored query which comsumes a lot of memory. I don´t know why but the next thing is that the memory isn´t free after Hcanceldeclaration() und Hfreequery() in the SP. Same in WD20 und WD21.
Any ideas ? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,julio 2016 - 11:49 |
Hi,
I use wl.datevalid(mydate) in the Query. This is the reason why the HF SQL Server consumes 2,5 GB memory and never give that back. I changed it to length(mydate) and everything is ok.
I think its a bug. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,julio 2016 - 13:00 |
Hi Michael,
If I remember correctly, there is a post in the support blog about memory problem with HFCS...
it SEEMS that in some cases, the memory is released by HF but NOT by the OS and they have an utility to solve that. You may be in that case...
I do not know if that post is available in English
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,julio 2016 - 14:22 |
Hi Fabrice,
thx for your reply. I searched the first 2 sites of the blog but found nothing.
Is there any way how I can search there and what is the "keyword" ? Memory ? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,julio 2016 - 20:09 |
Hi Michael,
you could search for mémoire, or RAM... Unfortunately I do not remember any more details... I think this utility was also discussed on the french windev forum...
However, I had a look in my personal archives, and I found the 2 following codes that are supposed to free memory in cases like this (both coming from the french windev forum)
This one: LOCAL nHDL est entier RetourFonction est un entier SI SysVersionWindows(sysVersionPlateForme)="NT" ALORS nHDL=API("Kernel32","GetCurrentProcess") RetourFonction=API("psapi","EmptyWorkingSet",nHDL) SI RetourFonction = 0 ALORS Erreur(ErreurInfo()) ; RETOUR FIN
and that one: PROCEDURE LibereMemoire() // Swap de la mémoire virtuelle LOCAL nHdl est un entier système = 0 SI SysVersionWindows() _DANS_ ("NT 3.5","NT 4","NT 5","XP","2003S","VISTA","7") ALORS nHdl = API("KERNEL32","GetCurrentProcess") API("KERNEL32","SetProcessWorkingSetSize",nHdl,-1,-1) FIN I'm giving them to you, "as is"
Let us know if one of them helps...
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,julio 2016 - 13:04 |
thx Fabrice.
I found a workarround but I try to test your code snipped next time. |
| |
| |
| | | |
|
| | | | |
| | |
|