Topic: Problem with virtual memory

Hi,

As you know I've got multiforum server with PunBB and from few weeks I've got problem with crashing MySQL. Usually I have Got error 12 from storage engine (Errno: 1030).

My host told me that MySQL is crashing from time to time because virtual memory isn't unloading sad

Example:

I have 400 MB used of physical memory and 3GB used of virtual memory sad

It's normal ? MySQL is crashing when virtual memory reaches 3 GB.

Please remember that I have 8845 forums at 2 GB ram memory.

Could you help me ?

Darmowe forum - Polish free forum hosting

Re: Problem with virtual memory

Well, I'd suggest you allocate more memory to MySQL since you have 2GB of it tongue
Other than that, try and figure out what's using up that memory

Re: Problem with virtual memory

my.cnf

#
# * Fine Tuning
#
key_buffer        = 128M
max_allowed_packet    = 64M
table_cache        = 2048
sort_buffer_size    = 16M
join_buffer_size    = 16M
read_buffer_size    = 512K
thread_stack        = 128K
thread_cache_size    = 8

#
# * Query Cache Configuration
#
query_cache_limit    = 1048576
query_cache_size        = 128M
query_cache_type        = 1

[mysqldump]
quick
quote-names
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[isamchk]
key_buffer        = 128M

We have tried to allocate more memory but it didn't help.

Darmowe forum - Polish free forum hosting

Re: Problem with virtual memory

Well, error 12 means "Cannot allocate memory", so I think the opposite would be appropriate in your case. You should try lowering the amount of memory MySQL allocates per connection. It's difficult to give general advice on how to do this because it differs greatly between setups. I suggest you search around for some MySQL optimization guides. Although a bit old by now, I've learned a lot from this one.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Problem with virtual memory

How about table online which is using memory (HEAP table) ? Mayby I should change to MyISAM because I have over 9000 forums with memory table online ? Maybe this is why my virtual memory is so high roll

Darmowe forum - Polish free forum hosting

Re: Problem with virtual memory

Yes, you could try it. MySQL in general tries to keep as much of it's tables in memory anyway (even if they are non-HEAP), but who knows.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

7 (edited by tomekf 2007-01-30 10:49)

Re: Problem with virtual memory

I have changed all online tables to MyISAM and now MySQL is using only 563 MB of virtual memory (2 GB before at the same time) smile I hope that is end of my problems wink

Darmowe forum - Polish free forum hosting

Re: Problem with virtual memory

Cool. Hope it works out in the long run.

"Programming is like sex: one mistake and you have to support it for the rest of your life."