| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Warren Young | Date: | September 19 2006 3:59pm |
| Subject: | Re: Connection sharing vs lost of query per connections | ||
| View as plain text | |||
Julien Chavanton wrote: > I think my problem was > mysql_ping() after reading the description again I found that we must > use this only when there was a significant idle period and not every > query like I was doing. Yes. While a ping is the least expensive round-trip call you can have to the database, it's still expensive in terms of local CPU time. > I guess the normal behaviour is to wait after an error and then > reconnect if possible? There's a MySQL connection option to make the library try to reconnect automatically. This was covered just days ago. Search the list. You should still write your code with an awareness that a connection could fail, however. Networks break, servers die.
| Thread | ||
|---|---|---|
| • Connection sharing vs lost of query per connections | Julien Chavanton | 18 Sep |
| • RE: Connection sharing vs lost of query per connections | Julien Chavanton | 18 Sep |
| • Re: Connection sharing vs lost of query per connections | Warren Young | 19 Sep |
| • RE: Connection sharing vs lost of query per connections | Julien Chavanton | 20 Sep |
| • Re: Connection sharing vs lost of query per connections | Warren Young | 21 Sep |
| • RE: Connection sharing vs lost of query per connections | Julien Chavanton | 20 Sep |
| • RE: Connection sharing vs lost of query per connections | Julien Chavanton | 20 Sep |
| • RE: Connection sharing vs lost of query per connections | Matt Dargavel | 21 Sep |
