Announcement

Collapse
No announcement yet.

connections not closing??????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • connections not closing??????

    My forums are just doggin, and this is what my server guy tells me, has anyone heard of this problem?

    The problem is with vBulliten. The number of connections to MySQL is ever increasing. This means that vBulliten is not closing them so there is a problem with the scripts of vBulliten. Perhaps the setup of the board was recently changed? The mysqladmin extended-status shows a continual increase in connections following a mysql restart.

    E.g.

    [email protected] [~]# mysqladmin extended-status
    +--------------------------+----------+
    | Variable_name | Value |
    +--------------------------+----------+
    | Aborted_clients | 0 |
    | Aborted_connects | 0 |
    | Bytes_received | 6928921 |
    | Bytes_sent | 99650637 |
    | Connections | 2016 |

    Try returning to the original settings of vBulliten, or refer to the vBulliten manual/trouble-shooting guide on the issue of connections not closing.

    [email protected]

  • #2
    Do you have persistant connections enabled in config.php?

    Comment


    • #3
      in config.php set usepconnects = 0 to turn off persistent connections
      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
      :: Nginx SPDY SSL - World Flags Demo [video results]
      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

      Comment


      • #4
        This is what it is set to:

        // use persistant connections to the database
        // 0 = don't use
        // 1 = use
        $usepconnect = 0;


        Could it be something else?

        One day it said I had 2236 on 08-16-2002 at 08:06 PM but that is not correct at all, i was lucky if I had 200-300 people on. Hope that clue helps..

        Comment


        • #5
          Today it says I only have 13 people on there, and this is not true as well, i have maybe about 80-100, they are able to post and the thread count is normal for today but the online user count is out of wack?

          Comment


          • #6
            57k members

            remember 2,000 users includes guests as well as any search engine spiders who crawl your site

            you may need mysql and server fine tuned so

            please provide the following

            1. your server specs, such as mysql and php version
            2. if possible how mysql was compiled/installed
            3. your top stats
            4. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type

            mysqladmin -u root -p variables

            copy and paste output here

            5. your mysql extended-status output either still telnet as root user type

            mysqladmin -u root -p extended-status

            copy and paste output here

            or preferred is to installed extended-status output script which is either located

            - in your vB 2.2.6 zip file's extra's folder, upload mysqlinfo.php script to your site or if you're on an pre vB 2.2.6 install go to
            - http://vbulletin.com/forum/showthread.php?threadid=3477 and install that scrip making sure to edit $mysqllogin line with your own mysqlusername and password

            and post url to that here

            6. oh and is your vB the only thing on the server? or other scripts? sites?

            7. how many average and max concurrent users on your vB forum ?

            8. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site

            <?
            phpinfo();
            ?>

            i.e. yourdomain.com/phpinfo.php

            9. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file) can you post the values you have set for the following :

            KeepAlive
            MaxKeepAliveRequests
            KeepAliveTimeout
            MinSpareServers
            MaxSpareServers
            StartServers
            MaxClients
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #7
              Specs

              Server specs.
              Dual p4 1ghz 1GbRAM
              Dedicated server.
              At the moment only 1 cpu running. need to recompile kernel.
              Linux
              Apache 1.3.26
              PHP 4.1.2
              MySQL 3.23.51

              TOP STATS
              9:55pm up 12 min, 1 user, load average: 17.66, 12.07, 7.76
              150 processes: 133 sleeping, 16 running, 1 zombie, 0 stopped
              CPU states: 66.8% user, 18.2% system, 0.0% nice, 14.8% idle
              Mem: 1028912K av, 373056K used, 655856K free, 364K shrd, 20028K buff
              Swap: 2096472K av, 0K used, 2096472K free 139612K cached

              PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
              4021 mysql 19 0 15104 14M 1484 R 15.3 1.4 0:00 mysqld
              3538 nobody 20 0 7468 7468 4780 R 11.3 0.7 0:00 httpd
              3576 nobody 20 0 7348 7348 4788 R 9.6 0.7 0:00 httpd
              3615 nobody 17 0 7328 7328 4772 S 8.0 0.7 0:00 httpd
              3687 nobody 17 0 7108 7108 4768 S 6.4 0.6 0:00 httpd
              3536 nobody 19 0 7360 7360 4788 R 5.6 0.7 0:01 httpd
              3651 nobody 19 0 7720 7720 4788 R 5.6 0.7 0:00 httpd
              3970 mysql 19 0 15104 14M 1484 R 5.6 1.4 0:01 mysqld
              3994 nobody 16 0 6456 6456 4664 S 5.6 0.6 0:00 httpd
              4011 mysql 20 0 15104 14M 1484 R 5.6 1.4 0:00 mysqld
              4016 mysql 20 0 15104 14M 1484 R 5.6 1.4 0:00 mysqld
              3643 nobody 20 0 7624 7624 4784 R 4.8 0.7 0:00 httpd
              3650 nobody 15 0 6772 6772 4784 S 4.8 0.6 0:01 httpd
              3979 mysql 19 0 15104 14M 1484 R 4.8 1.4 0:00 mysqld
              4001 mysql 19 0 15104 14M 1484 R 4.8 1.4 0:00 mysqld
              3540 nobody 16 0 7396 7396 4784 S 4.0 0.7 0:01 httpd
              3553 nobody 17 0 6664 6664 4796 S 4.0 0.6 0:01 httpd
              4027 mysql 20 0 15104 14M 1484 R 4.0 1.4 0:00 mysqld
              4032 mysql 20 0 15104 14M 1484 R 4.0 1.4 0:00 mysqld
              4033 root 19 0 1088 1084 820 R 4.0 0.1 0:00 top
              4034 mysql 19 0 15104 14M 1484 S 3.2 1.4 0:00 mysqld
              3580 nobody 16 0 7036 7036 4780 S 2.4 0.6 0:00 httpd
              3997 nobody 16 0 7456 7456 4724 S 2.4 0.7 0:00 httpd
              4035 mysql 18 0 15104 14M 1484 S 2.4 1.4 0:00 mysqld
              4036 mysql 19 0 15104 14M 1484 R 1.6 1.4 0:00 mysqld
              3634 nobody 10 0 7020 7020 4760 S 0.8 0.6 0:00 httpd
              3993 nobody 10 0 4724 4724 4540 S 0.8 0.4 0:00 httpd
              4037 mysql 14 0 15104 14M 1484 S 0.8 1.4 0:00 mysqld
              1 root 8 0 524 524 456 S 0.0 0.0 0:06 init
              2 root 8 0 0 0 0 SW 0.0 0.0 0:00 keventd
              3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kapm-idled

              Comment


              • #8
                cont.

                MYSQL VARIABLES
                +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
                | Variable_name | Value |
                +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
                | back_log | 50 |
                | basedir | / |
                | 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 | /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 | 131072
                | key_buffer_size | 8388600 |
                | 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 |
                | 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 |

                Comment


                • #9
                  cont.

                  | 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 | 8388608 |
                  | 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/HK10.pid |
                  | port | 3306 |
                  | protocol_version | 10 |
                  | record_buffer | 131072 |
                  | record_rnd_buffer | 131072 |
                  | 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 | 2097144 |
                  | sql_mode | 0 |
                  | table_cache | 64 |
                  | table_type | MYISAM |
                  | thread_cache_size | 0 |
                  | thread_stack | 65536 |
                  | transaction_isolation | READ-COMMITTED |
                  | timezone | EDT |
                  | tmp_table_size | 33554432 |
                  | tmpdir | /tmp/ |
                  | version | 3.23.45 |
                  | wait_timeout | 28800 |
                  +---------------------------------+-----------------------------------------------

                  Comment


                  • #10
                    cont.

                    MYSQL EXTENDED STATUS
                    +--------------------------+-----------+
                    | Variable_name | Value |
                    +--------------------------+-----------+
                    | Aborted_clients | 0 |
                    | Aborted_connects | 1 |
                    | Bytes_received | 7961384 |
                    | Bytes_sent | 123844046 |
                    | Connections | 2281 |
                    | Created_tmp_disk_tables | 0 |
                    | Created_tmp_tables | 1778 |
                    | Created_tmp_files | 0 |
                    | Delayed_insert_threads | 0 |
                    | Delayed_writes | 0 |
                    | Delayed_errors | 0 |
                    | Flush_commands | 1 |
                    | Handler_delete | 535 |
                    | Handler_read_first | 3072 |
                    | Handler_read_key | 305204 |
                    | Handler_read_next | 10895924 |
                    | Handler_read_prev | 0 |
                    | Handler_read_rnd | 441088 |
                    | Handler_read_rnd_next | 49738550 |
                    | Handler_update | 3605 |
                    | Handler_write | 114935 |
                    | Key_blocks_used | 5475 |
                    | Key_read_requests | 2214480 |
                    | Key_reads | 5471 |
                    | Key_write_requests | 2769 |
                    | Key_writes | 2361 |
                    | Max_used_connections | 76 |
                    | Not_flushed_key_blocks | 0 |
                    | Not_flushed_delayed_rows | 0 |
                    | Open_tables | 64 |
                    | Open_files | 92 |
                    | Open_streams | 0 |
                    | Opened_tables | 1185 |
                    | Questions | 48473 |
                    | Select_full_join | 0 |
                    | Select_full_range_join | 0 |
                    | Select_range | 8826 |
                    | Select_range_check | 0 |
                    | Select_scan | 6965 |
                    | Slave_running | OFF |
                    | Slave_open_temp_tables | 0 |
                    | Slow_launch_threads | 13 |
                    | Slow_queries | 194 |
                    | Sort_merge_passes | 0 |
                    | Sort_range | 7240 |
                    | Sort_rows | 445907 |
                    | Sort_scan | 5274 |
                    | Table_locks_immediate | 52169 |
                    | Table_locks_waited | 953 |
                    | Threads_cached | 0 |
                    | Threads_created | 2280 |
                    | Threads_connected | 22 |
                    | Threads_running | 6 |
                    | Uptime | 894 |
                    +--------------------------+-----------+

                    MaxSpareServers 10
                    MaxClients 200

                    PHP INFO
                    http://www.dsswareforums.com/phpinfo.php

                    APACHE CONFIG
                    RLimitMEM 207066112
                    RLimitCPU 120
                    Timeout 300
                    KeepAlive Off
                    MaxKeepAliveRequests 0
                    KeepAliveTimeout 15
                    MinSpareServers 5

                    That should be all the info!

                    Comment


                    • #11
                      dual P4s you mean P4 Xeons right ?

                      edit or create a my.cnf file at /etc/my.cnf

                      and replace contents with below and restart mysql
                      [client]
                      port = 3306
                      socket = /var/lib/mysql/mysql.sock

                      [mysqld]
                      port = 3306
                      socket = /var/lib/mysql/mysql.sock
                      skip-locking
                      set-variable = max_connections=750
                      set-variable = key_buffer=16M
                      set-variable = myisam_sort_buffer_size=64M
                      set-variable = join_buffer=1M
                      set-variable = record_buffer=1M
                      set-variable = sort_buffer=2M
                      set-variable = table_cache=1024
                      set-variable = thread_cache_size=256
                      set-variable = wait_timeout=3600
                      set-variable = connect_timeout=10
                      set-variable = max_allowed_packet=16M
                      set-variable = max_connect_errors=10

                      [safe_mysqld]
                      open_files_limit=8192

                      [mysqldump]
                      quick
                      set-variable = max_allowed_packet=16M

                      [myisamchk]
                      set-variable = key_buffer=64M
                      set-variable = sort_buffer=64M
                      set-variable = read_buffer=16M
                      set-variable = write_buffer=16M
                      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                      :: Nginx SPDY SSL - World Flags Demo [video results]
                      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                      Comment


                      • #12
                        also

                        from mysql status output it says you're using mysql 3.23.45 and not 3.23.51 so upgrade to mysql 3.23.51

                        also upgrade PHP 4.2.1 to 4.2.2 for bug fixes

                        and lower maxclients to 150 and restart apache

                        upgrade you linux kernel from 2.4.7-10 to 2.4.19 or higher stable vesion
                        Last edited by George L; Tue 20th Aug '02, 7:11pm.
                        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                        :: Nginx SPDY SSL - World Flags Demo [video results]
                        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                        Comment


                        • #13
                          wow it does look like the 2,000+ users were real according to the status output

                          | Threads_created | 2280 |


                          so at one point in time you did get that max connections to mysql

                          it could be you had a spike in traffic that day and had persistent connections enabled and a high maxclient and wait_timeout setting for mysql

                          or it could be attributed to mysql bugs in prior 3.23.51 versions of mysql and earlier linux kernels

                          or a bit of both
                          :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                          :: Nginx SPDY SSL - World Flags Demo [video results]
                          :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                          Comment


                          • #14
                            Thank you for the reply.
                            I will look into the updates right away!

                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...
                            X