Note that there are some explanatory texts on larger screens.

plurals
  1. POMySql *completely random* Unable to connect to any of the specified MySQL hosts
    primarykey
    data
    text
    <p>This one is killing me. We have an ASP.NET/Mono application on a MySQL database. For months we've been plagued by a completely random but consistent occurrence of "Unable to connect to any of the specified MySQL hosts". I'm by no means a MySQL pro, and I hope this is something silly.</p> <p>Specifics:<br /> MySQL 5.5.17<br /> MySQL Connector/Net 6.4.4<br /> Mono 2.10.8<br /> MonoDevelop 2.8.6.5<br /></p> <p>Connection string: SERVER=localhost,3306;DATABASE=xxx;UID=xxx;PWD=xxx;CONNECTION TIMEOUT=90;Encrypt=false;</p> <p>Max_connections is set to 150. There are never more than 5 connections, and they are all active (probably due to the pooling).</p> <ul> <li><p>The application is C# ASP.NET 3.5. Runs solid as a rock for years on Windows/IIS. Nine months ago our market led us to get off Windows, so we (easily I might add) moved the whole thing to Mono/Apache.</p></li> <li><p>The issue only occurs on the Mono side, but that's critical since we've retired our Windows support.</p></li> <li><p>Happens on average about 10 times an hour, but spacing varies wildly.</p></li> <li><p>The issue has been witnessed in the following configurations:</p></li> </ul> <p>Ubuntu 11/Apache2/mod_mono<br /> OSX Lion/Apacke2/mod_mono<br /> Ubuntu 11/xsp2/MonoDevelop debug server<br /> OSX Lion/xsp2/MonoDevelop debug server<br /></p> <ul> <li><p>Have messed with keepalive, wait_timeout, connectionreset, etc to no avail. Timings seem to have no effect. The error is instantaneous on conn.open - not after any connection timeout.</p></li> <li><p>Here's a clue - the app absolutely will not run with Pooling=false. Nearly every connection attempt fails. Of course I want pooling on, but I'm not sure why it wouldn't work without.</p></li> <li><p>The application has a built in "heartbeat" (user's session in the database) - every 2 minutes.</p></li> <li><p>The most maddening of all? It absolutely cannot be reproduced on demand in a running environment - it's random. I've examined query sizes, execution times, etc.</p></li> <li><p>In exactly one scenario can I make it happen: On initial startup of an Ubuntu server or OSX, the very first time Mono makes it's first connection to MySQL - it will happen then. After that, it's anybody's guess.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload