List:General Discussion« Previous MessageNext Message »
From:Sinisa Milivojevic Date:November 17 2000 5:17pm
Subject:Re: Memory problem.
View as plain text  
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
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