Morning,
This one is really driving me insane. I am developing a site for a client who doesn't particularly want to move their hosting away from their current provider. The current host are absolutely terrible with their support (shocking for a large hosting company) and I am running out of ideas.
I usually use Dreamweaver to it's full potential when developing sites but due to the fact that the host won't allow external access to the database, I am hand coding this from scratch rather than being able to test in the Dreamweaver environment.
The website is written in ASP VBScript and uses a MySQL database. Limitations of the hosting company states that you can only have 10 active connections to the database at any one time - this is fine and I am closing all connections, yet...
Very frequently, when you try to access the site, you are greeting with a HTTP 500.100 error page stating that:
'SQLState: S Native Error Code: 2013 [TCX][MyODBC] Lost connection to MySQL server during query.'
However, if you keep refreshing the page, eventually the website renders perfectly, and once you managed to get access, it runs absolutely fine throughout.
It seems to happen when you access the site from 'fresh' after maybe a day or even half an hour or so - it's almost as it the MySQL server is going into sleep mode or something and then by refreshing, it's waking up (??) .
The hosting company tell me there's absolutely no problems with the server and they don't know what to do or suggest as everytime they try to access the site, they get in straight away.
To post an example connection script:
--
mbeck2="**database details here**"
set con2 = Server.CreateObject("ADODB.Connection")
con2.Open mbeck2
Dim navigation
Dim navigation_numRows
Set navigation = Server.CreateObject("ADODB.Recordset")
navigation.ActiveConnection = mbeck2
navigation.Source = "SELECT * FROM navigation ORDER BY priority"
navigation.CursorType = 0
navigation.CursorLocation = 2
navigation.LockType = 2
navigation.Open()
navigation_numRows = 0
... then of course, closing the connection.
--
Any help would be really appreciated.
Kind regards,
Aidan
PS> From the details above, I wonder how many people might be able to guess which hosting company it is ?? ;-)