Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 1 Jahr, 5 Monaten
Letzter Beitrag:
vor 1 Jahr, 4 Monaten
Beteiligte Autoren:
Michael Drechsel, Fabrice Harari

[WD2X] Stored Procedures consumes a lot of memory

Startbeitrag von Michael Drechsel am 06.07.2016 07: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 ?

Antworten:

Re: [WD2X] Stored Procedures consumes a lot of memory [SOLVED]

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.

von Michael Drechsel - am 06.07.2016 09:49

Re: [WD2X] Stored Procedures consumes a lot of memory [SOLVED]

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

von Fabrice Harari - am 06.07.2016 11:00

Re: [WD2X] Stored Procedures consumes a lot of memory [SOLVED]

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 ?

von Michael Drechsel - am 06.07.2016 12:22

Re: [WD2X] Stored Procedures consumes a lot of memory [SOLVED]

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

von Fabrice Harari - am 06.07.2016 18:09

Re: [WD2X] Stored Procedures consumes a lot of memory [SOLVED]

thx Fabrice.

I found a workarround but I try to test your code snipped next time.

von Michael Drechsel - am 07.07.2016 11:04
Hi Michael,

Just got this information from Loic Hamel, PCSoft support. HFSQL 21 is supposed to include the equivalent of that code, (releasing memory in windows)...

So if you tested with WD20 and 21, but still with HFSQL 20, maybe just upgrading to HFSQL 21 could solve your problem.

If not, an email describing it to the technical support may allow them to correct the problem.

Best regards

von Fabrice Harari - am 22.07.2016 14:11
Hi Fabrice,

as I wrote I tried it in WD20+21. All the same.

>If not, an email describing it to the technical support may allow them to correct the problem.

I gave up sending anything to the technical Support because of my negative experience. They NEVER helped me in any of my reported problems ...

The only really help for me is this forum and your (and others) tips and hints.

von Michael Drechsel - am 23.07.2016 05:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.