Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11293 > unrolled thread

odbc mysql leak memory

Started bymoshe attia <attiamx@gmail.com>
First post2018-01-19 00:25 -0800
Last post2018-01-29 14:27 -0800
Articles 20 — 6 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  odbc mysql  leak memory moshe attia <attiamx@gmail.com> - 2018-01-19 00:25 -0800
    Re: odbc mysql leak memory Franz Rachbauer <office@rachbauer.org> - 2018-01-19 09:30 +0100
      Re: odbc mysql leak memory moshe attia <attiamx@gmail.com> - 2018-01-19 04:18 -0800
    Re: odbc mysql  leak memory dlzc <dlzc1@cox.net> - 2018-01-19 06:59 -0800
      Re: odbc mysql  leak memory moshe attia <attiamx@gmail.com> - 2018-01-19 07:20 -0800
        Re: odbc mysql leak memory Franz Rachbauer <office@rachbauer.org> - 2018-01-19 19:38 +0100
          Re: odbc mysql leak memory moshe attia <attiamx@gmail.com> - 2018-01-19 11:17 -0800
          Re: odbc mysql leak memory moshe attia <attiamx@gmail.com> - 2018-01-19 12:59 -0800
            Re: odbc mysql leak memory Lucio Chiessi <lucio@vorio.eti.br> - 2018-01-20 17:47 -0800
              Re: odbc mysql leak memory moshe attia <attiamx@gmail.com> - 2018-01-21 02:29 -0800
    Re: odbc mysql  leak memory jorge.dextrasistemas@gmail.com - 2018-01-23 00:54 -0800
      Re: odbc mysql leak memory Franz Rachbauer <office@rachbauer.org> - 2018-01-23 10:01 +0100
      Re: odbc mysql  leak memory dlzc <dlzc1@cox.net> - 2018-01-23 06:20 -0800
      Re: odbc mysql  leak memory Lucio Chiessi <lucio@vorio.eti.br> - 2018-01-24 19:55 -0800
    Re: odbc mysql  leak memory jorge.dextrasistemas@gmail.com - 2018-01-24 04:36 -0800
      Re: odbc mysql  leak memory Lucio Chiessi <lucio@vorio.eti.br> - 2018-01-24 19:57 -0800
    Re: odbc mysql  leak memory jorge.dextrasistemas@gmail.com - 2018-01-25 06:31 -0800
      Re: odbc mysql  leak memory Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2018-01-25 16:52 +0100
      Re: odbc mysql  leak memory Lucio Chiessi <lucio@vorio.eti.br> - 2018-01-25 16:33 -0800
    Re: odbc mysql  leak memory moshe attia <attiamx@gmail.com> - 2018-01-29 14:27 -0800

#11293 — odbc mysql leak memory

Frommoshe attia <attiamx@gmail.com>
Date2018-01-19 00:25 -0800
Subjectodbc mysql leak memory
Message-ID<1df1ea27-e662-428c-90d5-4c6ae7ad15c0@googlegroups.com>
hi..
i write app that use mysql with odbc 
every thing working good..
only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.

i write connection , open , update ,insert with sqlselect.  like the vo example..

if some one have an idia..

thank you
moshe attia.

[toc] | [next] | [standalone]


#11294 — Re: odbc mysql leak memory

FromFranz Rachbauer <office@rachbauer.org>
Date2018-01-19 09:30 +0100
SubjectRe: odbc mysql leak memory
Message-ID<p3sac0$1ko2$1@gioia.aioe.org>
In reply to#11293
Only one idea: Do you use <oSQLSelect>:FreeStmt(<kOption>) ---> lSuccess 
to free ressources?

Regards, Franz

Am 19.01.2018 um 09:25 schrieb moshe attia:
> hi..
> i write app that use mysql with odbc
> every thing working good..
> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with sqlselect.  like the vo example..
> 
> if some one have an idia..
> 
> thank you
> moshe attia.
> 

[toc] | [prev] | [next] | [standalone]


#11296 — Re: odbc mysql leak memory

Frommoshe attia <attiamx@gmail.com>
Date2018-01-19 04:18 -0800
SubjectRe: odbc mysql leak memory
Message-ID<cac0cc4c-e967-41ac-8f65-78023b40abd2@googlegroups.com>
In reply to#11294
yes for each sqlselect
i finish with close and free like the vo example.

[toc] | [prev] | [next] | [standalone]


#11297

Fromdlzc <dlzc1@cox.net>
Date2018-01-19 06:59 -0800
Message-ID<eda44ef1-4156-4a6d-ae70-faf5b09f3bf1@googlegroups.com>
In reply to#11293
Dear moshe attia:

On Friday, January 19, 2018 at 1:25:21 AM UTC-7, moshe attia wrote:
> hi..
> i write app that use mysql with odbc 
> every thing working good..
> only the problem that the memory use at task manager..
>  grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with
> sqlselect.  like the vo example..
> 
> if some one have an idia..

Can you spawn a child process (write connection , open , update ,insert with
sqlselect), separate from the "main process that runs all day", so that Windoze can recover all the memory when the child process completes?

I find a LOT of other languages that report memory leaks using ODBC, just do a search.  Like:
https://what.thedailywtf.com/topic/17368/stumped-on-memory-leak-odbc-connection

David A. Smith

[toc] | [prev] | [next] | [standalone]


#11298

Frommoshe attia <attiamx@gmail.com>
Date2018-01-19 07:20 -0800
Message-ID<4aeb6f41-a398-4ada-92bb-865ad59b7ab5@googlegroups.com>
In reply to#11297
hi ..
i open connection
after sqlselect
at the end close free,

[toc] | [prev] | [next] | [standalone]


#11299 — Re: odbc mysql leak memory

FromFranz Rachbauer <office@rachbauer.org>
Date2018-01-19 19:38 +0100
SubjectRe: odbc mysql leak memory
Message-ID<p3tdvm$1jlr$1@gioia.aioe.org>
In reply to#11298
When I started with MySQL 5.6 and ODBC I tested some versions of ODBC 
and found that ODBC 5.1.x does best. Try another version of ODBC, maybe 
one of it has problems.

I also open connection only once at program start and close it at 
program end. The programs often run some days without close.

Regards, Franz

Am 19.01.2018 um 16:20 schrieb moshe attia:
> hi ..
> i open connection
> after sqlselect
> at the end close free,
> 

[toc] | [prev] | [next] | [standalone]


#11300 — Re: odbc mysql leak memory

Frommoshe attia <attiamx@gmail.com>
Date2018-01-19 11:17 -0800
SubjectRe: odbc mysql leak memory
Message-ID<0b86b173-509b-4084-a08a-5e7b0143fcae@googlegroups.com>
In reply to#11299
ok i will try odbc 5.1 
now i use 5.3 

hope that will solve the problem
i will notice.
thank you.

[toc] | [prev] | [next] | [standalone]


#11301 — Re: odbc mysql leak memory

Frommoshe attia <attiamx@gmail.com>
Date2018-01-19 12:59 -0800
SubjectRe: odbc mysql leak memory
Message-ID<08fdc9db-37c4-45a2-853a-8b112daf5b7b@googlegroups.com>
In reply to#11299
On Friday, January 19, 2018 at 8:38:50 PM UTC+2, Franz Rachbauer wrote:
> When I started with MySQL 5.6 and ODBC I tested some versions of ODBC 
> and found that ODBC 5.1.x does best. Try another version of ODBC, maybe 
> one of it has problems.
> 
> I also open connection only once at program start and close it at 
> program end. The programs often run some days without close.
> 
> Regards, Franz
> 
> Am 19.01.2018 um 16:20 schrieb moshe attia:
> > hi ..
> > i open connection
> > after sqlselect
> > at the end close free,
> >


well i try mysql-connector-odbc-5.1.13-win32   still leak..

[toc] | [prev] | [next] | [standalone]


#11303 — Re: odbc mysql leak memory

FromLucio Chiessi <lucio@vorio.eti.br>
Date2018-01-20 17:47 -0800
SubjectRe: odbc mysql leak memory
Message-ID<66f4a865-6f1d-4c59-a057-73cb0de910f1@googlegroups.com>
In reply to#11301
Please try object variable := null_object att the end oficial use.
Thaís Will help the garbage.

[toc] | [prev] | [next] | [standalone]


#11304 — Re: odbc mysql leak memory

Frommoshe attia <attiamx@gmail.com>
Date2018-01-21 02:29 -0800
SubjectRe: odbc mysql leak memory
Message-ID<ed1250aa-7003-4ce2-912d-decace7a6e37@googlegroups.com>
In reply to#11303
On Sunday, January 21, 2018 at 3:47:10 AM UTC+2, Lucio Chiessi wrote:
> Please try object variable := null_object att the end oficial use.
> Thaís Will help the garbage.


HI ..
thank you its help alot..
 oconn:=NULL_OBJECT
i add to the end of the method when i finish the connection

[toc] | [prev] | [next] | [standalone]


#11312

Fromjorge.dextrasistemas@gmail.com
Date2018-01-23 00:54 -0800
Message-ID<60ba16cd-72a7-4dac-a2e0-982f1675a8c2@googlegroups.com>
In reply to#11293
El viernes, 19 de enero de 2018, 5:25:21 (UTC-3), moshe attia escribió:
> hi..
> i write app that use mysql with odbc 
> every thing working good..
> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with sqlselect.  like the vo example..
> 
> if some one have an idia..
> 
> thank you
> moshe attia.




"I also open connection only once at program start and close it at 
program end. The programs often run some days without close. "


Hi FRanz 

a question about this form
to work ... this works in a
intranet ... but working remotely
I have seen that the connection, after a while, falls. What is your experience? You have worked
with remote work stations connected
by Internet ?
Best regards
jorge accinelli
Buenos Aires





[toc] | [prev] | [next] | [standalone]


#11313 — Re: odbc mysql leak memory

FromFranz Rachbauer <office@rachbauer.org>
Date2018-01-23 10:01 +0100
SubjectRe: odbc mysql leak memory
Message-ID<p46tlr$14o9$1@gioia.aioe.org>
In reply to#11312
Jorge,
sorry no experience with connections by internet. All my apps work in 
intranets.

Regards, Franz

Am 23.01.2018 um 09:54 schrieb jorge.dextrasistemas@gmail.com:
> El viernes, 19 de enero de 2018, 5:25:21 (UTC-3), moshe attia escribió:
>> hi..
>> i write app that use mysql with odbc
>> every thing working good..
>> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
>>
>> i write connection , open , update ,insert with sqlselect.  like the vo example..
>>
>> if some one have an idia..
>>
>> thank you
>> moshe attia.
> 
> 
> 
> 
> "I also open connection only once at program start and close it at
> program end. The programs often run some days without close. "
> 
> 
> Hi FRanz
> 
> a question about this form
> to work ... this works in a
> intranet ... but working remotely
> I have seen that the connection, after a while, falls. What is your experience? You have worked
> with remote work stations connected
> by Internet ?
> Best regards
> jorge accinelli
> Buenos Aires
> 
> 
> 
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#11314

Fromdlzc <dlzc1@cox.net>
Date2018-01-23 06:20 -0800
Message-ID<df417a74-8704-418b-849a-30038a84dda1@googlegroups.com>
In reply to#11312
Dear jorge.dext...:

On Tuesday, January 23, 2018 at 1:54:54 AM UTC-7, jorge.dext...@gmail.com wrote:
...
> a question about this form
> to work ... this works in a
> intranet ... but working remotely
> I have seen that the connection, after a while, falls.
> What is your experience? You have worked
> with remote work stations connected
> by Internet ?

I am not the person you asked, but...

There is little difference between maintaining a database connection open to "the internet", and resources local but accessible via WiFi.  There are too many devices in between you and data that can be cycled on/off/around.  Such as switching IP addresses "for security" (or just to annoy).

David A. Smith

[toc] | [prev] | [next] | [standalone]


#11320

FromLucio Chiessi <lucio@vorio.eti.br>
Date2018-01-24 19:55 -0800
Message-ID<db41a57f-391a-4066-a1b0-103f0c09e5f5@googlegroups.com>
In reply to#11312
Hi Jorge.  You can setup TCP jeep Alice in tour database.
I'm using this in PostgreSQL with sucess.
You Mustang to set keep alive in a time smaller than router break connection time.

All my best

Lucio Chiessi
Rio de Janeiro - Brazil

[toc] | [prev] | [next] | [standalone]


#11318

Fromjorge.dextrasistemas@gmail.com
Date2018-01-24 04:36 -0800
Message-ID<1d0e9906-4b14-4763-8b71-4e0b0c02244f@googlegroups.com>
In reply to#11293
El viernes, 19 de enero de 2018, 5:25:21 (UTC-3), moshe attia escribió:
> hi..
> i write app that use mysql with odbc 
> every thing working good..
> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with sqlselect.  like the vo example..
> 
> if some one have an idia..
> 
> thank you
> moshe attia.

Thanks to both for the response.
Only as an illustration I tell an experience.
In a client there is a bBrowser always connected
to a remote mysql base. (so they need it)
Every so often the message appeared "the server has gone away." ..
As the program was already designed for a
permante connection .... to solve the problem
I put a timer that reconnects every 3 minutes
to the base and it works well.
But I have the doubt if it's better, when
it's about mysql remote bases, if it's not better
connect and disconnect all the time ....

best regards
jorge

[toc] | [prev] | [next] | [standalone]


#11321

FromLucio Chiessi <lucio@vorio.eti.br>
Date2018-01-24 19:57 -0800
Message-ID<9b1d5dcf-c059-4617-bef0-28dc16162396@googlegroups.com>
In reply to#11318
TCP keep alive can save you!

[toc] | [prev] | [next] | [standalone]


#11323

Fromjorge.dextrasistemas@gmail.com
Date2018-01-25 06:31 -0800
Message-ID<fc52dbd2-a075-47f6-9628-2dc9c8219ac9@googlegroups.com>
In reply to#11293
El viernes, 19 de enero de 2018, 5:25:21 (UTC-3), moshe attia escribió:
> hi..
> i write app that use mysql with odbc 
> every thing working good..
> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with sqlselect.  like the vo example..
> 
> if some one have an idia..
> 
> thank you
> moshe attia.

thanks! but ... 

What is tcp keep alive?
a soft? free or payment?
where is it installed? in each pc?
How do I link it with vo?

jorge

[toc] | [prev] | [next] | [standalone]


#11324

FromKarl Faller <mail_withoutthat_@_drei-f_andthat_.de>
Date2018-01-25 16:52 +0100
Message-ID<f8vj6d94d4gg31v0dudl2if20lvcb787ce@4ax.com>
In reply to#11323
you might look at e.g.
https://technet.microsoft.com/en-us/library/dd349797(v=ws.10).aspx#BKMK_2


Karl

On Thu, 25 Jan 2018 06:31:53 -0800 (PST),
jorge.dextrasistemas@gmail.com wrote:

>El viernes, 19 de enero de 2018, 5:25:21 (UTC-3), moshe attia escribió:
>> hi..
>> i write app that use mysql with odbc 
>> every thing working good..
>> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
>> 
>> i write connection , open , update ,insert with sqlselect.  like the vo example..
>> 
>> if some one have an idia..
>> 
>> thank you
>> moshe attia.
>
>thanks! but ... 
>
>What is tcp keep alive?
>a soft? free or payment?
>where is it installed? in each pc?
>How do I link it with vo?
>
>jorge
Regards

Karl

[toc] | [prev] | [next] | [standalone]


#11326

FromLucio Chiessi <lucio@vorio.eti.br>
Date2018-01-25 16:33 -0800
Message-ID<a03bc8ec-b3b9-4f6e-874e-2a7bc4ffb885@googlegroups.com>
In reply to#11323
I tink this can help you: https://groups.google.com/forum/m/#!topic/comp.databases.mysql/l3OUMtlXTLo

[toc] | [prev] | [next] | [standalone]


#11338

Frommoshe attia <attiamx@gmail.com>
Date2018-01-29 14:27 -0800
Message-ID<38134bb3-9952-4a93-a5c6-5f8e199bef86@googlegroups.com>
In reply to#11293
On Friday, January 19, 2018 at 10:25:21 AM UTC+2, moshe attia wrote:
> hi..
> i write app that use mysql with odbc 
> every thing working good..
> only the problem that the memory use at task manager..grow.from 10 mega to 300 mega .in day.
> 
> i write connection , open , update ,insert with sqlselect.  like the vo example..
> 
> if some one have an idia..
> 
> thank you
> moshe attia.


well i think now no leak memory...... all ways make your object...null 

 cquery:="UPDATE customers SET "+"`arm`='0',"+"`arm_mkag`="+"'"+mkag+"',"+"`lastonoff`="+"'"+mwcode+"',"+"`timeoff`="+"'"+Time24()+"',"+"`dateoff`="+"'"+DToC(Today())+"'"+" WHERE "+"`MokedCcode`="+"'"+m_mokedccode+"'"+ " LIMIT 1"
                           oStmt := SQLStatement{cquery, oConn}
                           
                           IF ! oStmt:Execute()
                          
	

                            ENDIF

                            oStmt:FreeStmt(SQL_DROP)
                            oStmt:=NULL_OBJECT

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web