change mysql wait_timeout?

Status
Not open for further replies.

notchobitnez

New Member
Messages
3
Reaction score
0
Points
0
Any way i could have the mysql wait_timeout config changed on my account? Its currently set at 10, could I have something more like a minute or two? Thanks very much.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
This is weird, normally the wait_timeout is set to a higher value (it's 8 hours, by default). That type of setting is set at a server level, when the mysql server is actually started. This means that it cannot be set only for an account. However, this is maybe due to some network connection error.

If you wish more information, could you post the error message you are getting?
 

notchobitnez

New Member
Messages
3
Reaction score
0
Points
0
Hi xav0989,

I am encountering the dreaded "mysql server has gone away" during script execution. Using the SHOW VARIABLES; statement in phpMyAdmin returns "wait_timeout 10". I was also under the impression that 8 hours was the default... Any thoughts/suggestions/assistance?

Thanks
Edit:
bump
anybody have an answer?
Edit:
beuller... beuller..... beuller....


anyone?
Edit:
beuller... beuller..... beuller....


anyone?
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
For me on Lotus, wait_timeout is 28800, which is the default. You can set wait_timeout as a session variable each time you open a connection by issuing the query:

Code:
SET wait_timeout=28800;

If you're using PDO (a much better choice than the MySQL or MySQLi drivers), you can issue the above statement by setting a PDO::MYSQL_ATTR_INIT_COMMAND driver option when creating the PDO connection object.

Make sure you don't have a script somewhere that's setting wait_timeout to 10. Ask for someone on the same host you're using to check the value of wait_timeout; if it's not 10, the problem lies somewhere in your scripts. If they also get 10, open a support ticket for a permanent fix.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
SHOW VARIABLES request gives:

wait_timeout 10

on Chopin.

After using

SET wait_timeout=28800;

SHOW VARIABLES request give it as 28800
 
Last edited:

notchobitnez

New Member
Messages
3
Reaction score
0
Points
0
Im executing SQL from phpMyadmin in my Cpanel account. Yesterday, when I used "SET wait_timeout=28800;" i got the error "You need to be a super user to change this setting". (Or something close to that...) Just now, i ran the same statement, and the response was "Your SQL query has been executed successfully" however, when I check, using "SHOW VARIABLES;" it still shows "wait_timeout 10"...

Any thoughts?

Thanks
Edit:
And im on stoli.x10hosting... Also checked my scripts for any wait_timeout, none found.
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The set statement will change the session variable. You don't have appropriate permissions to change the global variable. When the session ends, the value is lost, which is why I said to set it each time you open a connection as a workaround. Since another user on Stoli
also get[s a] 10 [for the value of wait_timeout], open a support ticket for a permanent fix.
 
Status
Not open for further replies.
Top