>-----Original Message----- >From: Les Schaffer [mailto:[EMAIL PROTECTED] >Sent: Wednesday, June 04, 2008 9:23 PM >To: mysql@lists.mysql.com >Subject: mysqld-nt Windows service: delay btwn svc running and accepting >conx > >We are having a small technical glitch about which we would like to have >some insight: > >our application needs to start mysqld-nt as a Windows service after >which we fairly quickly try to make connections to the Server. we are >using the python wrappers, MySQLdb, and we successfully bring up the >service 99.9% of the time. this means we get >win32service.SERVICE_RUNNING before trying to make connections. and >most other times, we have no problem making connections immediately >after SERVICE_RUNNING is achieved. [JS] We have a similar problem (not related to MySQL). When WinXP starts, it appears that the networking isn't fully operational for a variable period of time. What we did is set up a link that pings the thing we are trying to connect to. Only after the ping succeeds do we actually try to connect. You could do that.
I have no idea why this would happen when XP has been running for awhile, just because you bounced the MySQL server, but you could use the same basic procedure. > >however, if we try to start the app right after Windows XP boots, or if >XP has been sitting idle for a long while after the service had been >brought up and down, we get OperationalError 2003, can't connect to >server. when i check the server logs, i see that Windows ServiceManager >tells us that we are SERVICE_RUNNING several seconds before the log says >" ... mysqld-nt.exe: ready for connections ". > >we could put a 4-6 seconds on the connect_timeout, but we would like to >at least understand what we are seeing. are there other states the >ServiceManager would report for mysqld-nt, or are we limited to >STOPPED/STARTING/RUNNING/STOPPING? > >more to the point, what determines the time delay between >SERVICE_RUNNING and " ... mysqld-nt.exe: ready for connections " and is >there a tried and true way to detect "ready for connections" without >simply making a connection attempt??? > >thanks > >Les Schaffer > >-- >MySQL General Mailing List >For list archives: http://lists.mysql.com/mysql >To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >infoshop.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]