MySQL connection errors

Discussion in 'General' started by drake, Aug 16, 2006.

  1. drake

    drake New Member

    I'm running ISPConfig on SuSE 10, and although installation went well and the system seems to be working, I get regular mysql connection errors when using ispconfig itself and with the sites that I am hosting.

    The errors are generally like:
    in modules/core/classes/GalleryStorage.class at line 229 (MySqlStorage::error)
    in modules/core/classes/GalleryStorage.class at line 449 (MySqlStorage::_getConnection)
    in modules/core/classes/Gallery.class at line 223 (MySqlStorage::search)
    in modules/core/classes/GallerySession.class at line 911 (Gallery::search)
    in modules/core/classes/GallerySession.class at line 261 (GallerySession::_loadSessionData)
    in modules/core/classes/Gallery.class at line 315 (GallerySession::init)
    in at line 125 (Gallery::initSession)
    in main.php at line 73"

    and I get similar types of errors while using the ispconfig control panel.

    Generally the errors go after refreshing the page a few times, but it makes me think that there's something wrong with the setup.

    My googling etc has turned up no clues as to how I can troubleshoot this.

    Any ideas would be appreciated.


  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    What kind of gallery is that or another question what happens if you run
    mysql on the console and use the same username and password for that as you use on that gallery?

    Actually I don't know what that gallery directly has in common with ISPConfig.
  3. drake

    drake New Member

    MySQL storage errors

    The gallery is Gallery2

    The errors are not specific to the gallery (that was the first example I has to hand) - they occur with the ISPConfig admin pages, and my wordpress blogs. All the errors are similar.

    Running in the console is fine - no probs. It doesn't seem to be an access problem as such, because refreshing the page a few times allows the content to be displayed properly.
    Last edited: Aug 16, 2006
  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Hm that sounds strange... but what is the errormessage from mysqld then?
  5. drake

    drake New Member

    There doesn't appear to be any error in /var/lib/mysql/mysqld.log or mysqld.log.1
  6. falko

    falko Super Moderator ISPConfig Developer

  7. drake

    drake New Member

    Thanks for the reply - unfortunately (in one sense :) ) I have plenty of disk space:

    Filesystem Size Used Avail Use% Mounted on
    /dev/md1 5.1G 1.2G 3.9G 23% /
    tmpfs 252M 0 252M 0% /dev/shm
    /dev/sda1 31M 7.5M 22M 26% /boot
    /dev/md3 9.5G 492M 9.0G 6% /home
    /dev/md2 2.1G 665M 1.4G 33% /var

    I'll post the error I get when using ispconfig as well.
  8. drake

    drake New Member

    MySQL connection errors - maybe fixed

    I've been fiddling with the MySQL settings in my.cnf and so far, the errors have stopped. Here are the settings that I'm using:
    key_buffer = 64M
    max_allowed_packet = 16M
    table_cache = 1024
    sort_buffer_size = 2M
    net_buffer_length = 8K
    read_buffer_size = 1M
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 64M
    join_buffer_size = 1M
    thread_cache_size = 64
    wait_timeout = 900
    connect_timeout = 10
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    max_connections = 600

    Hopefully it'll stay fixed!

    Thanks for the replies.
  9. falko

    falko Super Moderator ISPConfig Developer

    What exactly did you change in your my.cnf?
  10. drake

    drake New Member

    my.cnf changes

    Hi Falko
    I increased all of the buffer sizes, max_connections, thread_cache_size - in fact, pretty much every value in the list. max_connections had to be added as it wasn't there already. All the buffer sizes were quite low.

    Unfortunately I wasn't clever enough to save the original for comparison....d'uh.

    The original my.cnf was the default as per perferct-setup installation - I hadn't made any changes before getting the connection errors.

Share This Page