homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

MYSQL Client out of Memory
how to predict?

 1:15 am on Sep 13, 2005 (gmt 0)

I'm still plagued with the occasional mySQL CLient out of memory problem. The DB will just STOP, and I'm shut down at random times.

I thought I could control it by refreshing the Key Cache Buffer as that would fill up and crash. So I refresh it and clear it daily.

But something else is still causing the memory leak. Yes, I need to fine-tooth my code to find it, but in the meantime, I'd like to know if there is a way to predict when it will happen. What indicator on W2000 will tell me when the mySQL client will run out - or how much memory it is using at any given time?




 6:11 am on Sep 13, 2005 (gmt 0)

Are you aware of this problem?

A memory leak occurs after you install Microsoft Windows 2000 Server Service Pack 4 [support.microsoft.com]
the "updated" version. [support.microsoft.com]

Have you read?

Evaluating Memory and Cache Usage [microsoft.com]

The only Win2000 memory utilities I've used:

1. Task Manager (for short term memory usage checking):
* press CTRL+ALT+DEL
* click Task Manager
* click Performance (tab)

2. Performance Monitor (for memory tracking):
* click Start
* select Programs
* select Administrative Tools
Note: if not visible:
> right-click Task Bar
> click Properties
> click Start Menu Options (tab)
> check Display Administrative Tools (in Start Menu Settings)
> click Apply
> click OK
> start again! (Programs will now show Administrative Tools)
* click Performance
* click '+' (Add button)
* select Memory (from drop menu)
* select properties want to track i.e. Available Bytes, Page faults/sec.

Hope something helps - memory leaks are nasty, persnickety, migrane inducing ...
Good Hunting :-(


 1:33 pm on Sep 13, 2005 (gmt 0)

Thanks for those tips, good resources. I'm kind of dismayed that I need to call MS to get the hotfix for that one. But the $245 is cheap insurance if it fixes the problem.

One question about this though - do you suppose that this is directly related to the mySQL Client out of memory? No other programs or processes throw this error.

Is there a way to determine just how much memory the mySQL client is using as opposed to all memory on the server?


 4:43 pm on Sep 13, 2005 (gmt 0)

Is there a way to determine just how much memory the mySQL client is using as opposed to all memory on the server?

A sultry contralto AI who keeps the coffee fresh would be nice too ...

Which MySQL version are you using?
Are you using a custom or stock interface?
Do your system and MySQL log files show anything useful?

If it is MySQL that is out of memory it (usually) generates a specific error message. That you are not mentioning that makes me wonder more about the OS, sub-systems, or DB interface.

mysqld (Bytes of memory) = key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections
If too large decrease one or more setting variables.

I keep wanting to suggest *nix analysis tools ... don't know any other Win2000 ones.


 4:51 pm on Sep 13, 2005 (gmt 0)

A sultry contralto AI who keeps the coffee fresh would be nice too ...

We already have one of those.

mySQL 4.0.18NT
key_buffer_size: 268,435,456
read_buffer_size: 131,072
sort_buffer_size: 2,097,144

The DB interface is all custom, except for mySQL-Front which we use for maintenance. My "site" is a very intensize web-app, so every interaction is from the web through SQL commands.

I see nothing in the Event Logs that reference the mySQL client.

The error is always: mySQL Client has run out of memory.

I reset the key buffer nightly and I can see the usage in the mySQL Administrator program, but I don't see indicators for the other two keys. It looks like I can add them, but I need to know the formulas to do so.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved