List:General Discussion« Previous MessageNext Message »
From:Diego Zabaleta Date:November 17 2000 5:30pm
Subject:RE: Memory problem.
View as plain text  
Hello Sinisa,

Before anything else thank you to respond me.
The programs that  are running close the connection when they conclude and
the memory is liberated without problems.
The topic is that these processes implemented in C are running several days
with oneself active connection, I have allowed them to run for three days
and they consumed around 10 Mbytes of swap, although this depends on the
quantity of operations that you/they are made on the base MySQL.
For some reason the routine of space liberation not me this working (it is a
supposition). I don't say that it is a problem of MySQL, but the routines
are very simple (all similar ones to the code that passes in my previous
mail) and they liberate space when concluding.

Thank you,
Diego. -

P.D. : Excuses for my very not well English one. :-)

-----Mensaje original-----
De: Sinisa Milivojevic [mailto:sinisa@stripped]
Enviado el: Viernes 17 de Noviembre de 2000 2:18 PM
Para: dzabalet@stripped
Cc: mysql@stripped
Asunto: Re: Memory problem.


Diego Zabaleta writes:
 >
 > The use by heart of the processes mysqld it is increased considerably of
to
 > four kbytes every 5 seconds approximately. In the team in question are
 > running 4 programs that consent to MySQL by means of the interface of
MySQL
 > for C, all the functions that you/they obtain data of the charts MySQL
they
 > liberate the used memory.
 >
 > For sure the problem is since the programs in C when not being executed
the
 > demons mysqld they stop to consume memory; the topic is that in all the
 > calls that I make I liberate the used memory.
 > The logic that you/they use the routines in C is the same one that the
 > function that I happen next.
 >

> --------------------------------------------------------------------------
--
 > -------------------------------------------------------
 >
 > int DB_Existe_Id_Cliente (element *agente)
 >

 >  MYSQL_RES      *result;
 >  int            	   return;
 >  MYSQL_ROW     row;
 >
 >  sprintf(query, SELECT names FROM clients WHERE id=%d",
agent->info.header.id_cliente);
 >  if ((retorno=mysql_query(connection,query)) != 0)
 >         return -1;
 >
 >  result=mysql_store_result(connection);
 >  if (mysql_num_rows(result) == 0)
 >

 >         mysql_free_result(result);
 >         RETURN FALSE;
 >  }
 >
 >  IF ((row=MYSQL_FETCH_ROW(RESULT)) == NULL)
 >                 return -3;
 >
 >  strcpy(agente->info.header.nombre_cliente,row[0]);
 >  mysql_free_result(result);
 >  return TRUE;
 > }
 >

> --------------------------------------------------------------------------
---------------------------------------------------------
 >
 > Are there some error or incorrect use of the functions of the interface
for C in the routine DB_Existe_Id_Cliente?
 > Does somebody have some idea of that that this happening?
 >
 > Thank you,
 > Diego. -
 > Top output:
 >
 >  Nov 17 12:01:26:
 >
 >   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME
COMMAND
 >   860 root       0   0  5476 5192  1820 S       0  0.0 11.0   0:01 mysqld
 >   864 root       0   0  5476 5192  1820 S       0  0.0 11.0   0:00 mysqld
 >   865 root       0   0  5476 5192  1820 S       0  0.0 11.0   0:00 mysqld
 >  3614 root       0   0  5476 5192  1820 S       0  0.0 11.0   0:00 mysqld
 >  3619 root       0   0  5476 5192  1820 S       0  0.8 11.0   0:09 mysqld
 >  3621 root       0   0  5476 5192  1820 S       0 22.0 11.0  13:41 mysqld
 >  3623 root       0   0  5476 5192  1820 S       0  0.0 11.0   0:00 mysqld
 >
 >
 >  Nov 17 12:02:21
 >
 >   860 root       0   0  5504 5220  1820 S       0  0.0 11.1   0:01 mysqld
 >   864 root       0   0  5504 5220  1820 S       0  0.0 11.1   0:00 mysqld
 >   865 root       0   0  5504 5220  1820 S       0  0.0 11.1   0:00 mysqld
 >  3614 root       0   0  5504 5220  1820 S       0  0.0 11.1   0:00 mysqld
 >  3619 root       0   0  5504 5220  1820 S       0  0.1 11.1   0:09 mysqld
 >  3621 root      12   0  5504 5220  1820 S       0 52.5 11.1  14:02 mysqld
 >  3623 root       0   0  5504 5220  1820 S       0  0.0 11.1   0:00 mysqld
 >
 >


Hi!

If I understand you well, you claim that we have memory leak.

After you close connection, please flush tables and see if memory
get's released to OS.


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

--
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php" before
posting. To request this thread, e-mail mysql-thread56652@stripped

To unsubscribe, send a message to:
    <mysql-unsubscribe-dzabalet=adinet.com.uy@stripped>

If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
    http://lists.mysql.com/php/unsubscribe.php


Thread
Memory problem.Diego Zabaleta17 Nov
  • Re: Memory problem.Sinisa Milivojevic17 Nov
RE: Memory problem.Diego Zabaleta17 Nov
  • RE: Memory problem.Sinisa Milivojevic17 Nov
RE: Memory problem.Diego Zabaleta17 Nov
  • RE: Memory problem.Sinisa Milivojevic18 Nov
RE: Memory problem.Diego Zabaleta21 Nov
  • RE: Memory problem.Sinisa Milivojevic22 Nov