Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2002

    mysql blocked because of many connection errors

    I just transfered all my databases to one server and gived evry user a "%" for remote conection. so far so good

    But somethimes I get this error from some scripts and when I reboot the server it wil work again.

    Al the sites/scripts are conected to database from outside ( not localhost)

    P.S: I have plesk on RH7.2

    Warning: Host 'server-adres-where-my-scripts-are-located' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' in /home/sites/site9/web/index.php on line 98

    Whats wrong? and how to helped?

    TNX in advanced.
    Last edited by babak; 10-24-2002 at 04:29 PM.

  2. #2
    Join Date
    Oct 2002

    you can try increasing the number of allowed mysql connections in the server where database is stored..

    set-variable = max_connections=500

    in the my.cnf to a higher value and restart mysql...

  3. #3
    Join Date
    Mar 2002
    I think that mysql conection is standaard 300. ( correct me if I am wrong).

    So There was more than 300 conections to my database server?!!!

    and if conection limiet is reached, users will get a page that say liemiet is up, no errors ? ( correct me if I am wrong).

    And I type "find / -name my.cnf" but he did'nt find it. where is my.cnf located on a plesk server?

    This server is only for mysql use, so whats the best config?

    TNX for your replay
    Last edited by babak; 10-24-2002 at 05:24 PM.

  4. #4
    Join Date
    Nov 2000
    Vancouver, BC
    you may want to make sure users aren't using persistent connections either, in a shared hosting environment it can really eat up your available connections as they stay open for something like 8 hours i believe (not positive on that) and unlike non-persistant connections, aren't closed at the end of a script's execution

  5. #5
    Join Date
    Mar 2002
    tnx for your help.

    Ok. I found out that I had to make a my.cnf

    I puted in /usr/local/psa/mysql/var/my.cnf ( its standaard plesk, no rpm).

    When I chenge system-variable to make a test, it still show the old variabels in phpmyadmin. ( yes mysql is stop/started).

    Should I chown my.cnf to mysql.mysql ?
    Courent right are only read ( -r--r--r-- ) shoul I change that?

    Is /usr/local/psa/mysql/var/my.cnf the good place?

    Because I dont think that mysql read my my.cnf file

    this is what phpmyadminshows:


    back_log 50
    basedir /usr/local/psa/mysql/
    binlog_cache_size 32768
    character_set latin1
    character_sets latin1 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/psa/mysql/var/
    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
    interactive_timeout 28800
    join_buffer_size 131072
    key_buffer_size 268431360
    language /usr/local/psa/mysql/share/mysql/english/
    large_files_support ON
    locked_in_memory OFF
    log OFF
    log_update OFF
    log_bin ON
    log_slave_updates OFF
    log_long_queries OFF
    long_query_time 10
    low_priority_updates OFF
    lower_case_table_names 0
    max_allowed_packet 1047552
    max_binlog_cache_size 4294967295
    max_binlog_size 1073741824
    max_connections 100
    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 /usr/local/psa/mysql/var/
    port 3306
    protocol_version 10
    record_buffer 1044480
    record_rnd_buffer 1044480
    query_buffer_size 0
    safe_show_database OFF
    server_id 1
    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 1048568
    sql_mode 0
    table_cache 256
    table_type MYISAM
    thread_cache_size 8
    thread_stack 65536
    transaction_isolation READ-COMMITTED
    timezone CEST
    tmp_table_size 33554432
    tmpdir /tmp/
    version 3.23.51-log
    wait_timeout 28800

  6. #6
    Join Date
    Oct 2001
    san diego
    it also tells you how to correct the problem within the error:

    Warning: Host 'server-adres-where-my-scripts-are-located' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' in /home/sites/site9/web/index.php on line 98

    run this:
    mysqladmin -uroot -p flush-hosts
    enter root password

  7. #7
    Join Date
    Mar 2002
    Hi again

    Ok I get evrything running now

    1 more question!

    How mny user-conection and buffering-mem ect... should I put in my.cnf ?

    Intelceleron 1ghz
    512 mb
    256kb catch

    Only for mysql use (other servers will conect to him)

    Tnx again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts