I bet your webserver and database server are seperate machine.
Make sure the hostname of web and db are in the /etc/hosts on both machine,
it's very slow to use DNS to resolve everything

----- Original Message -----
From: "Leonardo Dias" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 10:41 PM
Subject: Very slow to connect


> I don't know if any of you people have ever had this trouble, but it's
> been a messy one here.
>
> Whenever a website of ours get lots of traffic, MySQL gets too slow to
> connect. Whenever it connects, the queries are fast. Since lots of our
> scripts relies on database connections, it has become a big problem to
> our website and we've been unable to answer to our costumers what is
> going on.
>
> a mysqladmin status shows the following:
>
> Uptime: 441237  Threads: 29  Questions: 23849146  Slow queries: 11390
> Opens: 90355  Flush tables: 8  Open tables: 128 Queries per second avg:
> 54.051
>
> We know that 54 queries per second should be a lot, but it's not. We've
> already had more traffic than that. A show processlist rarely shows more
> than 30 processes. The machine is a Linux SMP with 2 CPUs PIII 800MHz
> and 1G of RAM. What could possibly be wrong? Also, our setup for
> file-max is big enough to support lots of connections.
>
> We, of course, do lots of concurrent updates and selects in some (not
> all) tables.
>
> For the MySQL specialists out there, these are the variables returned by
> a show variables. Are there any values that could be changed so that the
> connection wouldn't be so slow?
>
> Are there people with the same problems out there? I'm waiting for a
> shout from the wild... :)
>
> Thanks.
>
> --
> Leonardo Dias
> Catho Online
> WebDevelopper
> http://www.catho.com.br/


----------------------------------------------------------------------------
----


> Variable_name Value
> ansi_mode OFF
> back_log 100
> basedir /usr/local/mysql/
> binlog_cache_size 32768
> character_set latin1
> character_sets latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8
dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251
estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5
> concurrent_insert ON
> connect_timeout 5
> datadir /usr/local/mysql/data/
> 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_innobase NO
> have_isam YES
> have_raid NO
> have_ssl NO
> init_file
> interactive_timeout 28800
> join_buffer_size 1929216
> key_buffer_size 134213632
> language /usr/local/mysql/share/mysql/english/
> large_files_support ON
> locked_in_memory OFF
> log ON
> log_update OFF
> log_bin OFF
> log_slave_updates OFF
> long_query_time 10
> low_priority_updates OFF
> lower_case_table_names 0
> max_allowed_packet 9048064
> max_binlog_cache_size 4294967295
> 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_tmp_tables 32
> max_write_lock_count 4294967295
> myisam_recover_options OFF
> myisam_sort_buffer_size 8388608
> net_buffer_length 16384
> net_read_timeout 30
> net_retry_count 10
> net_write_timeout 60
> open_files_limit 0
> pid_file /usr/local/mysql/data/mysql.pid
> port 3306
> protocol_version 10
> record_buffer 1531904
> query_buffer_size 0
> safe_show_database OFF
> server_id 0
> skip_locking ON
> skip_networking OFF
> skip_show_database OFF
> slow_launch_time 2
> socket /tmp/mysql.sock
> sort_buffer 4194296
> table_cache 128
> table_type MYISAM
> thread_cache_size 0
> thread_stack 65536
> timezone UTC
> tmp_table_size 9048568
> tmpdir /tmp/
> version 3.23.30-gamma-log
> wait_timeout 28800
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to