473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Lost connection to MySQL server - driving me insane

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 ?? ;-)
Sep 27 '07 #1
2 3194
dafodil
392 256MB
Check your internet connection first. If the problem still persist, the problem might be on the hosting site. Maybe, your client needs further explanation about the situation.
Sep 28 '07 #2
Hi, thanks for the reply.

The internet connection is fine and the problem replicates with machines running from different ISPs too.

I so desperately want to move the hosting away from this company but they don't allow you to point domain names to external hosting and they charge a fortune to move away. Plus, the client really doesn't want or need any downtime during any transition (which I can fully understand). In relative sense, this isn't a 'heavy' website and should work absolutely fine - could easily run it from my powerbook if it was left on 24 hours a day.

I am sooooo lost on this one - it's driving me nuts. The hosting company have now stated that they will not talk to me anymore about it as there servers are running fine - yet - I know other people with the same host experience the same issues.

Cheers,
Aidan
Sep 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayne... | last post by:
I'm trying to get asp to conect to a MySQL database, I've tried copying a few examples online that I found and I always get a 500 error with the code below. what am i doing wrong? any examples of...
0
by: Keith Bussey | last post by:
Hello all, After changing RAM and the ethernet card of my DB server, the problem of getting frequent: Database error (error code 102) Could not connect to database server (Lost connection to...
0
by: Al Caponi | last post by:
Hi all, There is a limitation on Win98 when a client app using mm.mysql driver doing extensive queries to MySQL 3.23.x frequently encounters a connection lost error. Error msg is something...
0
by: Jim the Bad | last post by:
Hi, I wonder if anyone can help me with this. Bog standard SuSE 8.2 Linux install. I have installed mySQL (off the SuSE 8.2 distro CDs). I can connect locally, e.g: bealzebub> mysql -u root...
0
by: Michael | last post by:
I'm using Red Hat Linux 9.0 My SQL 4..0.15 Tomcat 4.1.27 JConnector 3.0.9 I've configured a DataSource in the /home context. I can access the database just fine when I initially satart the...
3
by: Matias Silva | last post by:
Hi Everyone, I wrote a for loop to build several select statements that are combined with a UNION. When I execute one of the queries separately, it works, but when I execute the query with a UNION...
3
by: Dan | last post by:
Hi, I have an access 2003 database which connect to sql server via a DSN that goes through a VPN. The database works fine and everyone can coonect from their normal computers but for anyone working...
0
by: Bruno Barberi Gnecco | last post by:
I'm using stored procedures in a PHP site, with mysql. I'm having problems with stored procedures. Of the two I'm using, one works all the time, consistently. The other works correctly, but the...
5
by: xoise | last post by:
Warning: mysql_connect() : Lost connection to MySQL server at 'reading initial communication packet', system error: 113 in /webs/sites/monetized.com/includes/mysql_connect.inc.php on line 2 Lost...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.