Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Memory Leak


I have developed a high intensity database driven smpp gateway and clients the problem is that I am experiancing a memory leak...My app starts out using about 0.1% memory and after a couple of hours sits at 10%I think it has something to do with the mysql_store_results() function




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Memory Leak?
I am writing a program using the C API which slows down then finally crashes because there is a memory leak. I have determined that the memory leak happens because the API function mysql_free_result() doesn't actually free the result. The memory usage immediately before and after the call to mysql_free_result is identical. I am using MySQL 5.0 on Ubuntu Linux.

In order to reproduce the error, compile the following C program using either gcc or g++ using the following commands: Code:

View Replies !   View Related
Libmysql.dll V5.1 Memory Leak
In working with large files and libmysql.dll (not libmysqld.dll) I am discovering that resources are not released when MySQL_Close() is called for the last thread.

My Application reads from one table and writes to another using a single TRANSACTION. The target table size is about 600MB.

Memory increases steadily up to about 1.2 GB as this process progresses, and is only released when the dll is unloaded from memory by closing the app.

I have triple checked my application and it is not responsible. What could the dll be holding on to and how can I get it to release that memory if not a memory leak?

View Replies !   View Related
MySQL With C++ Causes Memory Leak?
The garbage collector tells me it's using the same amount of memory, but the Task Manager shows it using 4-10KB more each second. Any ideas?

If i remove all references to the actual datareader then the mem usage is stable, but as soon as it starts to return records then the leak appears. Code:

View Replies !   View Related
MySQL Memory Leak
I appear to have a memory leak problem caused by mysql

I currently have 10 instances of
/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
running but not actually doing anything. These have been running since the 9th (last time I restarted mysql)
There are 2 that if you trace process on them are doing something...

Process 565 has a subprocess of 567 and then 567 has the rest as subprocesses. But none of those subprocesses are running mysql commands - or doing anything other than eating memory. When I restart the server, applications are using 0.5Gb Memory then that creeps up to currently using 1.1Gb. So what are those dead process and why are they hanging around?

View Replies !   View Related
Compiled Mysql++ Memory Leak
I compiled mysql++ with Visual Studio 2003, the problem is I got i
memory leak when i debug the application, the leak occurs even when i
only use the mysqlpp::Connection class. Note I linked mysqlpp with mysql 5.0

View Replies !   View Related
Out Of Memory; Check If Mysqld Or Some Other Process Uses All Available Memory;” Error
We have found that the MYSQL on all Email DB servers starts throwing “Out of memory; check if mysqld or some other process uses all available memory;” error. The error goes once we restart MySQL. But after a week again the same problem occurs. We have 4 GB of physical memory on the server but Mysql utilizes only up to 2.5 GB & starts throwing Out of memory error. Can someone from Database team look into it?

View Replies !   View Related
Truncating A Memory Table Wont Release Memory
I have a memory table that when i truncate it system memory that has been allocated by mysql isnt released. Im running mysql 5.1.

View Replies !   View Related
Memory Usage :: Swap Memory Not Released?
We have Mysql 5.0 running on RH linux. We have noticed that the swap memory increases but never gets released unless we reboot the server every 2-3 weeks. How would I know whats using this swap memory?

Second question which I think maybe related to the first is that mysql is using a lot of memory when I do a top. Is there a way to limit the memory usage of mysql? I have a large table in mysql about 7 GB and I have 8 GB physical memory and swam is set to use 2GB.

View Replies !   View Related
Memory Use?
I'm looking for minimal memory use on a Windows XP machine. Which version would be best for this? And can anyone tell me if there's any favored links to MySQL tutorials?

View Replies !   View Related
Use All Memory
Mysql use all memory of my box, apache always down,
what can i do? how to limit the memory usage of mysql?

View Replies !   View Related
Out Of Memory
I'm running 5.0.41 on a dual quad core xeon beast of a machine that has 8 gigs of ram. The OS is FreeBSD 6.2 STABLE.
When I run top I MySQL is only using 512 mb of ram. No matter what I change in the my.cnf file, I can't seem to increase that. Can someone take a look at my my.cnf file and give me some suggestions?
Here is the contents of my.cnf:

# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/db/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password= your_password
port= 3306
socket= /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket= /tmp/mysql.sock
skip-locking
interactive_timeout = 180
wait_timeout = 180
key_buffer = 512M
max_allowed_packet = 2M
table_cache = 1024
sort_buffer_size = 4M
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 128M
thread_cache_size = 16
query_cache_size = 256M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

View Replies !   View Related
Max Memory
how much memory in a worst case mysql (a default install) consumes? I have programs blowing out of memory in a 750MB laptop and can't find the culprit.

View Replies !   View Related
Memory
Is there a way to see how much memory is left in the database.

View Replies !   View Related
Memory Error
I'm running mysql 4.1 on Intel 4 Linux gcc 2.4.

Have found serious problem with memory leak - can't call calloc repeatedly without a seg fault.

problem comes after a connect call has been made.

View Replies !   View Related
Memory Leaks
I am using the mysqlclient library 4.0.14 on win2k. It works fine but there are memory leaks I have no solutions for.

I have tried this:

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
MYSQL MySQL;
mysql_init(&MySQL);
mysql_close(&MySQL);
mysql_thread_end();

return 0;
}

.... but in the debug mode I get results like this:

Detected memory leaks!
Dumping objects ->
{52} normal block at 0x00974088, 556 bytes long.....

View Replies !   View Related
My.cnf Memory Specifications
In my my.cnf file, these are some of the things that are specified in
[mysqld]:

set-variable = key_buffer=256M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = max_connections=1000
set-variable = thread_concurrency=10
set-variable = innodb_buffer_pool_size=40M
set-variable = innodb_additional_mem_pool_size=40M

On FreeBSD, I only have one process running which makes this information
pretty straight forward. On my linux boxes, there are many different
processes running (on one box, there is 31).

Does this mean that *each* of those 31 processes attempts to allocate the
above amount of resources, or that the above resources are being shared
between the 31 processes?

View Replies !   View Related
Mysqldump Out Of Memory
I have some some large tables, 30 mil rows, some rows has long blogs size (300M). I used mysqldump -q to dump it, but i still get out of memory error.

View Replies !   View Related
Client Ran Out Of Memory
i got an error while my site gets loaded

Warning: mysql_query() [function.mysql-query]: Unable to save result set in /path../includes/mysql.class.php on line 39

Error in Selection MySQL client ran out of memory

My site didnt get loaded and was stuck by displaying this error .,


View Replies !   View Related
Out Of Memory Errors
Several times a day we're seeing in the error log:

Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

I can't find any documentation to explain describing what 'ulimit' is or exactly where to find it. Where using version 5.0.15-nt-max.

View Replies !   View Related
My.cnf File And RAM Memory
Our company trying to migrate to mySQL 5.0 and I'm having some problems setting it up on our first new server.

System: 8 GB Ram, Dual-core.
OS: Red Hat Enterprise Linux 4

I'm trying to change the directory the database is stored. I understand this is the datadir value in the my.cnf. This file doesn't exists so I found the my-large.cnf, my-huge.cnf, etc.

First I assume I should use the my-hug.cnf since we have over 2 GB RAM. Second I can't find a datadir variable in any of the optional .cnf files to chage. How should I specify the directory change

Also do I change all the /var/lib/mysql/ to the new directory or the one value.

View Replies !   View Related
Out Of Memory After Mysqldump
Using all InnoDB tables v5.0.16 under Linux, Get this message:

[ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit'
to allow mysqld to use more memory or you can add more swap space

It only happens after all databases have been dumped from the instance.
Any ideas?

View Replies !   View Related
Server Out Of Memory
After a few requests, my server answers to me 'out of memory (Needed 1048548)', and i need to restart the server.I changed the variable 'query_cache_limit' to 20M, but the result is the same.

View Replies !   View Related
Can't Allocate Memory
I'm using mysql 4.1.12-standard-log on a HP-UX11.11 with 8G Memory. I'm using the InnoDB storage system.

If I try to configure mysql to use more than 700M, I get the following error:

InnoDB: Error: cannot allocate 943734784 bytes of memory with malloc! Total allocated memory by InnoDB 30553264 bytes. Operating system errno: 12
Check if you should increase the swap file or ulimits of your operating system.

I check the ulimits and is set to unlimited. There is over 2G free swap memory.

Any ideas on how to avoid this problem?

View Replies !   View Related
Memory Issues
We have recently installed beta version of our application on IBM - Pentium Xeon - dual processor, 1 GB RAM, 80 GB HDD on Fedora Core 3 OS. The kernel version which I currently have is: 2.6.9-1.667 and Mysql Server version: 4.0.20-standard.

I have noticed that mysql processes (using 'top' command) take up substantial amount of memory over period of time. Please take a look at mysql processes output of 'top' command below: Code:

View Replies !   View Related
Memory Tables
Memory tables get wiped when the server restarts so, for those with experience of memory tables - what happens then? How are the tables rebuilt?

View Replies !   View Related
Using Up Memory Or Resources Or Both Or Neither?
I am doing a call where I go into a directory and open up all the files found and call my database each time to check for either the existence or lack of.. The database gets called each time with a $DBlink = new DB; and opens up a connection to the database each time. The directory originally had 200000 files in it and the program kept halting up. I split the directory up into 10000 file chunks but it still halts up after a while.

My question is... am I using up all my memory or am I using up all my resources or none of the above and it's something else?

I do a mysql_free_result after every query and I do a mysql_close on the link after I'm done.

View Replies !   View Related
Cannot Allocate Memory
This error suddenly showed up about 3 days ago and it has steadily gotten worse to the point that our log files are now filled with this error and the site is effectively dysfunctional.

I am seeing the following show up in the PHP logs:mysql_connect() [function.mysql-connect]: Can't create a new thread (errno 12); if you are not out of available m

Any idea what could be causing it and how I could fix it? This never happened when we had 1 GB of RAM installed but now it is suddenly happening after doubling the RAM to 2 GB about a week after adding that new RAM.

View Replies !   View Related
Mysql On Flash-memory
I have a question about flash-memory lifespan.

My database consists of 1 table, the table has 50 fields of 10 bytes
each, thus each record will have 500bytes. There are 1000 records in
the table, so roughly the table will have a size of 0.5MByte. The
system will update the record sequentially, one record is updated per
second. That is 3600 update per hour or 86400 per day.

If I store this database on a 64MB flash-memory card then how long does
the card last before wearing out.

View Replies !   View Related
Lowering Memory Usage?
I was wondering if there's any way I can lower MySQL's = memory

useage? It often uses more than 50000kb which I consider to much.. I'm guessing I should play with my.cnf or whatever it's called (located at = C:/ and windows calls it cardnumber or something)...

View Replies !   View Related
Lowering Memory Usage
there's any way I can lower MySQL's =
memory
useage? It often uses more than 50000kb which I consider to much.. I'm
guessing I should play with my.cnf or whatever it's called (located at =
C:/
and windows calls it cardnumber or something)

View Replies !   View Related
MySQL 4.0.13 Memory Problem
I want to get your opinions on how to increase available/free memory and
performance on a heavy volume database server.

I have MySQL 4.0.13 running on RH 7.2 replicated to another RH 7.2 using same
MySQL version.
Recently our master database server (2 AMD Cpu + 2Gb memory + 2Gb swap space)
started to suffer from memory outages because of heavy load. During day
available free memory is changing from 200Mb to 5Mb and when available memory
reaches to 5Mb MySQL starts to give 'Too many connections' messages. Db server
is working with 45-70 query/second and more than 25,712 connection per hour.
There are active 13-18 threads serving databases.

To increase available free memory I've did following :
1- Optimized all tables
2- Removed unneccessary/old indexes
3- Moved unused databases to replication server
4- Increased key_buffer_size from 8Mb to 16Mb

This changes helped a bit but still memory is a problem for MySQL. Average MySQL
thread used to consume 100-120 Mb memory before changes, now it is consuming
60-70Mb per thread. What should I do to prevent 'too many connections' messages
and have more memory available on database servers? Should I remove more indexes
from tables? Should I increase key_buffer_size to 32Mb or more? Key_buffer_size
doesn't look like a problem since key efficiency looks 100% most of the time.

View Replies !   View Related
Memory Allocation Limit
I downloaded the mysql 4.0.16 binary for AIX 5.1 from Mysql.com
website. How much memory can this binary's mysqld handle? Is it a
32-bit or 64-bit process?

It seems that it can only allocate a maximum of 2GB of memeory (by
setting the maxdata as suggested on the AIX note in the
documentation). I am using mainly innodb tables. Occasionaly, I have
encountered "out of memory error".

We have 4GB of memeory on our RS6000 (AIX 5.1). It is used as a
dedicated mysql server. Is there a way I could allocate more memory
for mysqld?

View Replies !   View Related
Memory Alignment In MySQL
CREATE TABLE my table
(coll_a INT NOT NULL,
coll_b SMALLINT,
coll_c SMALLINT,
INDEX b_index (coll_b)
);

Above is the table I will created. I declare coll_b and coll_c, which
together will cose me 4 bytes in one row. Is it? What if I declare
both of them as INT, will it cost me more memory? How about the
memory needed for the index b_index? Not sure how memory alignment
will affect MySQL.

View Replies !   View Related
MySQL And Memory Consumption
I've done a new install on a Freebsd server (5.1), using the latest ports of MySql 4.1.
Everything seems to work great. However when I do a "top", I notice that Mysql is consuming around 321M of memory.
This is is a virtually empty database with nothing loaded into it yet. Everything seems to be performing fine. Its just that I don't ever remember MySql using this much memory just after a new installation.

View Replies !   View Related
Mysql Is Not Using ENOUGH Memory On Linux
Running mysql 3.23.56-1.9 (yes , upgrading soon!) on red hat.

Our database:
- data is 5GB or so
- has approx 2GB of indices

We have 4GB of memory on the machine. At least 2.5GB of that is free+cached

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = key_buffer=500M
set-variable = myisam_sort_buffer_size = 64M
set-variable = table_cache=600
set-variable = join_buffer=1M
set-variable = thread_cache = 8
set-variable = sort_buffer =4M
set-variable = record_buffer=4M
set-variable = thread_cache_size = 64
set-variable = thread_concurrency=8
set-variable = max_allowed_packet = 16M
set-variable = tmp_table_size = 64M

But, no matter how much memory I set for key_buffer in /etc/my.cnf, mysql seems to use very little of it after running millions of queries:

14951 mysql 15 0 226M 221M 1308 S 3.3 5.5 89:55 0 mysqld

View Replies !   View Related
MySQL Client Ran Out Of Memory
I'm using a mysql server with my own TCP/IP server on the same FreeBSD machine.
MySQL stores a users database, like logins and passwords.

It works fine for a couple of days, but after that my simple queries with one row of result stops working.

It says "MySQL Client ran out of memory".
If I connect to mysql using other tools or simply restart my server - it works fine again under the same queries. So please don't support I use a huge amount of data, whole database can be selected in one query under normal conditions, its pretty small.

My Server Info:

sr10# mysql --version
mysql Ver 14.7 Distrib 4.1.16, for portbld-freebsd5.4 (i386) using 4.3

View Replies !   View Related
Out Of Memory Error In Select
I get this error, when I do a select * from tabel. and yes I need to do the query. The manual don't say anything about how I can fix this ?


View Replies !   View Related
Memory Table Full
I've read that memory tables are supposed to gracefully 'fallback' to the default engine when they reach a certain size, but I'm not finding that they behave that way. Within my application, I had run into situations where

CREATE TEMPORARY TABLE xxxx ENGINE=Memory
SELECT xxx...

would result in a "The table 'xxxx' is full" error. I had to change from memory to the default engine to ensure they would work, but most of the queries were much faster when using in memory temp tables where appropriate.

Is there a way to ensure MySQL will gracefully switch to another engine when the temporary table becomes too large for the heap engine?

View Replies !   View Related
Mysqlimport Out Of Memory Error
I am trying to import some tables into a database. During the importing I come across a 12MB file that results in the following error message:

mysqlimport: Out of memory (Needed 76164 bytes)
*note - the number of bytes is not exact*

View Replies !   View Related
Bringing Records Into Memory/RAM
I am working in a database project in which some tables in the database is having around 2 Million rows. It is taking quite long time(more than 30 minutes) for order by & group by queries though index is used on those specific columns.

Is there any other way to optimize the query retrieval speed? I heard there is a concept of moving all the records into the memory or RAM to increase the performance. I didn't understand what does it mean of moving data into memory/RAM.

View Replies !   View Related
Client Ran Out Of Memory Error
I am trying to insert about 10,000,000 records from a table (MYISAM MYSQL 5.0.22) into a Sybase ASA database table. I have done this many times from Sybase to Sybase.

I also get the same error when mearly trying a select query returning the rows (WINSQL).

Is there a parameter on the ODBC driver to prevent this?

Is there a parameter on the MYSQL server to prevent this?

I am already using the allow big results flag on the 3.5x ODBC driver.

Both servers have plenty of ram 4 Gb with 8 Gb swap files.

View Replies !   View Related
Memory Usage Overhead
I've been analysing the memory usage of our server and each SQL thread seems to be taking up 10mb -since our site is basically a search site that means we're using 10mb per user which means with our 2gb RAM we can take around 120-200 simultaneous visitors.

Other than buying more RAM, what can I do to increase the number of simultaneous connections (ie - how can I reduce memory usage?) By my Calculations we need to be able to accept around 500 simultaneous searchers to meet our target.

We will also be increasing the amount of data we have - currently it is around 1.5 million records but that will be gradually increasing to around 10 million - which I'm sure will also increase the memory load on the server. Right now we have 1.4Gb Data and 380Kb overhead.

View Replies !   View Related
Out Of Memory Error Means
Does anyone know what this error means.

#1037 - Out of memory; restart server and try again (needed 65528 bytes)

View Replies !   View Related
MyISAM Index In Memory
Any way to put an index permanently in memory for a MyISAM table? Or is this done automatically?

View Replies !   View Related
Memory Maxed Out And Slow Performance
We have two main query types running against a table of some 2 million
rows and have gotten query response down to well under a second by
using the right indexes.

Problem is that we are running an advertising campaign that brings a
concentrated block of users to the site. When this happens one of the
queries which relies on a particluar index comes severely of the rails
and can take up to 2 minutes filling the slow query log for 15 to 20
minutes. The other query type never appears in the slow log at these
times.

Can anyone explain why this is happening?

The server has 2Gb of ram and a key_buffer of 1Gb. When the problems
occur mysql uses all of the key_buffer but the total value of the MYI
files is under 250Mb. What is in memory - thread related buffers?

It seems as though the index required for the query is not in memory
and the disks are coming into play. Why is only one index affected?

I would really appreciate some pointers, what can I check to pinpoint
the problem and what settings should I implement to preserve
performance?

Front end is 4 cold fusion web servers using persistent connections.
max_connections is currently at 100.

View Replies !   View Related
Invalid Access To Memory Location.
I have a hosted account - I'm getting this error now..... Any reason that I can hunt down to figure out why I should be getting it?

View Replies !   View Related
Replication: Cpu And Memory Utilization Of Threads
As we know that replication process uses 3 threads-

1. Master thread (Binlog Dump)
2. I/O thread
3. Sql Thread

Now I have some confusion regarding these thing --

- In peek hours what will be the cpu and memory utilization of these
threads and if there is high load on master thread then what will be the
effects of this in mysql performance.

- if sql thread executing query on slave server and that time if we
fire a select query on same table then what will happen.Select query
will wait or not

We are using innodb tables in both master and slave

View Replies !   View Related
Memory Fault (core Dumped)
I am getting this message when I try to connect to my recently upgraded MySQL ( I went from 3.21 to 4.1.7) on windows XP pro... I used the configuration wizard after the windows install wizard and have even tried to access mysql from the command line... this is not really a permissions issue because I can't even connect as root to set up the other permissions with the grant command.

View Replies !   View Related
Mysql Eating Big Chunks Of Memory
I'm running version 4.0.16 on solaris 8 as the backend for a web site
serving around 12 million pages impressions a month. The performance
of the server is monitored using orcollator.

I'm finding that the memory usage on the server remains pretty
constant for weeks at a time at around 300 Meg but then every once in
a while the size of the mysqld process jumps anywhere between another
50 and 250 Meg. It then stays at this new size until mysql is
restared (or jumps again). The memory increase appears to remain as
resident according to the output of top.

The site has a content management system which connects directly to
the production data base as well which while it is used daily has some
functionality which is only used as frequently as this problem occurs
making me suspect it is the culprit.

What I could really do with some advice on is

- What are the most likely causes of the memory loss.

- whether there are tools that allow you to see a breakdown of how the
current memory is being used by mysql, or even better monitor it over
time, in order to establish the source of the problem.

- And if there aren't any such tools how best to approach this.

View Replies !   View Related
Root Password :: Program Too Big To Fit In Memory
All day i'm trying to reset the root password, our webserver was crashed this week, our control panel software created a random password.

I tried both methods for resetting the password, with the init tekst file and with the command -u root --skip-grant-tables.

Everytime I get the same error within the command promt "Program too big to fit in memory"

I tried this on two windows xp machines and one one windows 2003 server.

View Replies !   View Related
Linux 32bit X86 3gb Memory Limit
I am running MySQL-4.1.9 on a dual xeon FC3 box.
Is it safe to set mysqld to use more than 2 GB of memory?
If not, what upper limit of memory usage would you suggest for memory usage on a 32-bit box?
How would you calculate how much memory mysql will use?

View Replies !   View Related

Copyright 2005-08 www.BigResource.com, All rights reserved