Professional Web Applications Themes

Setting wait_timeout - MySQL 4.1 on FreeBSD - MySQL

I'm running MySQL version 4.1.16 on FreeBSD version 5.4-release. I'm trying to set the wait_timeout to something other than the default 8 hours (28800). I just can't seem to get it to take any notice of the various methods I've tried. Here's what I've tried: 1. Set up a global options file in /etc/my.cnf 2. Set a server options file in /var/db/mysql/my.cnf 3. Set the value of "mysql_args" in /etc/rc.conf (although I'm not sure whether --wait_timeout is a valid command line option, but I thought I'd try it anyway). In the my.cnf files, I'm adding "wait_timeout=86400" to the [mysqld] group. ...

  1. #1

    Default Setting wait_timeout - MySQL 4.1 on FreeBSD

    I'm running MySQL version 4.1.16 on FreeBSD version 5.4-release. I'm
    trying to set the wait_timeout to something other than the default 8
    hours (28800). I just can't seem to get it to take any notice of the
    various methods I've tried. Here's what I've tried:

    1. Set up a global options file in /etc/my.cnf
    2. Set a server options file in /var/db/mysql/my.cnf
    3. Set the value of "mysql_args" in /etc/rc.conf (although I'm not sure
    whether --wait_timeout is a valid command line option, but I thought
    I'd try it anyway).

    In the my.cnf files, I'm adding "wait_timeout=86400" to the [mysqld]
    group.

    Regardless of what I do, after mysql is restarted and I connect in and
    execute "show variables", wait_timeout remains stubbornly as 28800.

    Can anyone explain precisely how to set the wait_timeout option?

    Clive Backham Guest

  2. #2

    Default Re: Setting wait_timeout - MySQL 4.1 on FreeBSD

    "Clive Backham" <googledelback.co.uk> wrote in message
    news:1139075142.182667.210800g47g2000cwa.googlegr oups.com...
    > Regardless of what I do, after mysql is restarted and I connect in and
    > execute "show variables", wait_timeout remains stubbornly as 28800.
    I have found that you can't set the wait_timeout to a value greater than
    28800. You can set it to something less.

    I ran into this in reference to some difficulties using MySQL from Java apps
    running in Tomcat. The only solution I found is to put logic in your data
    access classes to re-connect after it detects a connection failure. Not
    very satisfying.

    Regards,
    Bill K.


    Bill Karwin Guest

  3. #3

    Default Re: Setting wait_timeout - MySQL 4.1 on FreeBSD

    > I have found that you can't set the wait_timeout to a value greater than 28800.
    > You can set it to something less.
    Thanks for the info. I tried setting the timeout to 200, but "show
    variables" still displayed it as 28800. But then it *did* time out
    after a few minutes, so I think that perhaps it was working but "show
    variables" was displaying the wrong value.

    I had always been led to believe that the maximum timeout allowed is
    31536000 (365 days), so I've set it to the higher value I want and
    we'll see what happens.

    Clive Backham Guest

  4. #4

    Default Re: Setting wait_timeout - MySQL 4.1 on FreeBSD

    Just a quick status report in case it's of help to anyone else.

    I set the timeout to a suitably high figure in /var/db/mysql/my.cnf
    and, although "show variables" still gives a wait_timeout figure of
    28800, the connection in question has not timed out after a couple of
    days. So it would seem that the configuration works, but for some
    reason "show variables" is reporting the wrong value.

    Clive Backham Guest

Similar Threads

  1. Replies: 2
    Last Post: February 14th, 10:54 AM
  2. Replies: 0
    Last Post: January 29th, 02:03 PM
  3. good guide for setting up mysql
    By Glen Davie in forum MySQL
    Replies: 1
    Last Post: November 23rd, 08:32 AM
  4. Compile FreeBSD RELENG_5 on FreeBSD 4-STABLE
    By Brovo Karokin in forum FreeBSD
    Replies: 1
    Last Post: February 25th, 09:04 AM
  5. Advice for setting up local hosting/mysql/php ?
    By Charley in forum PHP Development
    Replies: 1
    Last Post: October 7th, 12:48 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139