PDA

View Full Version : Memory runs out -- -- server crashes


Male_LadyBug
Fri 8th Feb '02, 11:05am
hi i've got this real problem that is driving me crazy

i have a deticated server p111 1Ghz
512mb ram - - -> on the way to upgrade to 1Gb
60gb hard disk

Operating System: Red Hat Linux 7.2

am using vb 2.03 - - -> will upgrade to 2.2.2 soon

the problem is my memory runs out of ram and the server crashes

this is mysql extended-status results:
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| Aborted_clients | 1 |
| Aborted_connects | 1 |
| Bytes_received | 74208362 |
| Bytes_sent | 795509753 |
| Connections | 13795 |
| Created_tmp_disk_tables | 4832 |
| Created_tmp_tables | 10439 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 3275 |
| Handler_read_first | 31613 |
| Handler_read_key | 2637936 |
| Handler_read_next | 12712174 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 2383467 |
| Handler_read_rnd_next | 53306737 |
| Handler_update | 94634 |
| Handler_write | 314481 |
| Key_blocks_used | 4151 |
| Key_read_requests | 11330644 |
| Key_reads | 4019 |
| Key_write_requests | 11553 |
| Key_writes | 2642 |
| Max_used_connections | 47 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 61 |
| Open_files | 92 |
| Open_streams | 0 |
| Opened_tables | 79 |
| Questions | 569672 |
| Select_full_join | 19579 |
| Select_full_range_join | 0 |
| Select_range | 52375 |
| Select_range_check | 0 |
| Select_scan | 60297 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 1 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 51227 |
| Sort_rows | 2703264 |
| Sort_scan | 28624 |
| Table_locks_immediate | 543458 |
| Table_locks_waited | 119 |
| Threads_cached | 28 |
| Threads_created | 48 |
| Threads_connected | 20 |
| Threads_running | 1 |
| Uptime | 50865 |
+--------------------------+-----------+

Male_LadyBug
Fri 8th Feb '02, 11:07am
and mysql vatiables:

back_log | 50
basedir | /
binlog_cache_size | 32768
character_set | latin1
character_sets | latin1 big5 czech ... etc
concurrent_insert | on

|
|
| connect_timeout | 10 |
| datadir | /var/lib/mysql/ |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| flush | OFF |
| flush_time | 0 |
| have_bdb | NO |
| have_gemini | NO |
| have_innodb | NO |
| have_isam | YES |
| have_raid | NO |
| have_openssl | NO |
| init_file | |
| interactive_timeout | 28800 |
| join_buffer_size | 6287360 |
| key_buffer_size | 16773120 |
| language | /usr/share/mysql/english/ |
| large_files_support | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_update | OFF |
| log_bin | OFF |
| log_slave_updates | OFF |
| log_long_queries | OFF |
| long_query_time | 10 |

Male_LadyBug
Fri 8th Feb '02, 11:08am
| low_priority_updates | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 1048576 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_connections | 500 |
| max_connect_errors | 10 |
| max_delayed_threads | 20 |
| max_heap_table_size | 16777216 |
| max_join_size | 4294967295 |
| max_sort_length | 1024 |
| max_user_connections | 0 |
| max_tmp_tables | 32 |
| max_write_lock_count | 4294967295 |
| myisam_max_extra_sort_file_size | 256 |
| myisam_max_sort_file_size | 2047 |
| myisam_recover_options | 0 |
| myisam_sort_buffer_size | 67108864 |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 10 |
| net_write_timeout | 60 |
| open_files_limit | 0 |
| pid_file | /var/lib/mysql/hawaaworld.hawaaworld.com.pid |
| port | 3306 |
| protocol_version | 10 |
| record_buffer | 6287360 |
| record_rnd_buffer | 6287360 |
| query_buffer_size | 0 |
| safe_show_database | OFF |
| server_id | 0 |
| slave_net_timeout | 3600 |
| skip_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slow_launch_time | 2 |
| socket | /var/lib/mysql/mysql.sock |
| sort_buffer | 9437176 |
| sql_mode | 0 |
| table_cache | 1024 |
| table_type | MYISAM |
| thread_cache_size | 256 |
| thread_stack | 65536 |
| transaction_isolation | READ-COMMITTED |
| timezone | ?? |
| tmp_table_size | 33554432 |
| tmpdir | /tmp/ |
| version | 3.23.45 |
| wait_timeout | 3600 |
+---------------------------------+-----------------------------------------------


during (33 members and 56 guests) daily average peak 160 - 170
this is my system info
http://hawaaworld.com/public_html/tools/phpsystem

PLEASE HELP

eva2000
Fri 8th Feb '02, 3:16pm
what version of php do you have installed ?

can you post a url to your phpinfo file

Male_LadyBug
Fri 8th Feb '02, 11:47pm
PHP 4.1.1

this is the phpinfo url

http://hawaaworld.com/phpinfo.php

:)

eva2000
Sat 9th Feb '02, 3:18am
try editing your /etc/my.cnf file and reducing your join, sort and record buffers from 6M to 2M and restart mysql

Male_LadyBug
Sat 9th Feb '02, 7:00am
ok

i changed to 2m

and restarted

it's down to 94% -95%

??

Male_LadyBug
Sun 10th Feb '02, 5:19am
is this percentage good or bad?:confused:

Male_LadyBug
Thu 14th Feb '02, 7:06pm
Ok we upgraded our ram to 1Gb

and i've got phpAdsNew running with it

and the wierd thing is
99% of the ram is used
and the cpu load is around 1.44 - 1.77 ????

what's wrong

am affraid it will crash any second

eva2000
Thu 14th Feb '02, 7:11pm
Originally posted by Male_LadyBug
Ok we upgraded our ram to 1Gb

and i've got phpAdsNew running with it

and the wierd thing is
99% of the ram is used
and the cpu load is around 1.44 - 1.77 ????

what's wrong

am affraid it will crash any second linux memory usage is dynamic so it's always in use either for processes or as a cache.. to see how much real memory is used in telnet/shell as root user type

free

nuno
Thu 14th Feb '02, 7:24pm
:eek:
table_cache | 1024 |
your table cache is set too high

eva2000
Thu 14th Feb '02, 7:29pm
Originally posted by nuno
:eek:
table_cache | 1024 |
your table cache is set too high nope... that's fine table_cache set up to 1024 is fine... i have this set on all the vB/servers i have worked on and they all are fine :)

nuno
Thu 14th Feb '02, 7:38pm
eva
shoudnt table_cache be similar to open_tables value? :confused:

Male_LadyBug
Thu 14th Feb '02, 7:39pm
total used free shared buffers cached
Mem: 1026900 1013924 12976 364 48776 733032
-/+ buffers/cache: 232116 794784
Swap: 522104 256 521848

eva2000
Thu 14th Feb '02, 8:34pm
Originally posted by nuno
eva
shoudnt table_cache be similar to open_tables value? :confused: open_tables is statistic showing mysql's usage

table_cache is a variable a setting to tell mysql what to limit table cache or open_tables to