On Dec 31, 2007, at 7:27 AM, Dave Stredulinsky wrote:
> I tried Ed Leafe example connection to "dabodev.com",
> Database="webtest" and it works fine I can keep the connection for as
> long as I want.
That would suggest that the difference is in the MySQL server that
you are using.
> My hosting service support have not solved the problem
> that I have when I connect to my database. I ran the following
> Python code:
>
> import dabo
> import time
> conn = dabo.db.dConnection(Host="XXX", Database="XXX",
> User="XXX", PlainTextPassword="XXX", DbType="MySQL")
So you really want these values public? I can obscure them in the
archives if you need.
> cursor = conn.getDaboCursor()
> time.sleep(11)
> print cursor.execute("select count(*) as usercount from users")
> print cursor.getDataSet()
>
> If I make the sleep time before the cursor.execute 9 seconds of less
> then the entire script runs. If I make it 11 seconds or larger
> then the
> cursor.execute command give the error "MySQL server has gone away".
> Perhaps someone could try the above to confirm that it has nothing
> to do
> with my computer or firewall.
I get it to work with 10 seconds or less, and have the same problem
with 11 or more.
> I noted that after I get the error that I can issue the cursor =
> conn.getDaboCursor() again an not get an error, but then trying the
> cursor.execute command again still gives the error message.
Well, since the cursor is using the same expired connection, that
isn't surprising.
If you have admin privileges on that MySQL server, can you run a
"SHOW VARIABLES LIKE '%TIMEOUT%' " query to see what the various
settings are? Specifically, you may have the INTERACTIVE-TIMEOUT or
NET_READ_TIMEOUT setting too low. I tried running the command, but
get an empty response, indicating that the login being used does not
have privileges for that.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]