| List: | MySQL and Perl | « Previous MessageNext Message » | |
| From: | Jochen Wiedmann | Date: | June 10 2001 2:04pm |
| Subject: | Re: Maintaining State/Cached Connections | ||
| View as plain text | |||
Hi, Stas, Quoting Stas Bekman <stas@stripped>: > Jocheh, your example could be correct if the parent process is the one > that opens the connections. However this is not true: > Apache::DBI->connect_on_init only registers a hook to DBI::connect() > for PerlChildInitProcess phase. Which means that every time Apache > spawns a new process, a *new* connection gets opened by this new child > process. This connection is unique to each process, hence there is no > problem. > > This section of the guide is correct to my understanding and > experience. If that's the case, you are right, of course. However, I don't see the performance gain in that case? IMO this means, that even those child processes will open a database connection that never use it at all? As Stas said: Anything done in the parent process should be avoided. This implies the creation of statement handles, if you think of such things. Yours, Jochen
| Thread | ||
|---|---|---|
| • DBD::mysql Problems | Jason Allocco | 6 Jun |
| • Re: DBD::mysql Problems | Jeremy Zawodny | 6 Jun |
| • Re: DBD::mysql Problems | ed phillips | 6 Jun |
| • Maintaining State/Cached Connections | Dodger | 6 Jun |
| • Re: Maintaining State/Cached Connections | Todd Finney | 7 Jun |
| • Re: Maintaining State/Cached Connections | Dave Rolsky | 8 Jun |
| • Re: Maintaining State/Cached Connections | Jochen Wiedmann | 8 Jun |
| • Re: Maintaining State/Cached Connections | Todd Finney | 8 Jun |
| • Re: Maintaining State/Cached Connections | Jochen Wiedmann | 8 Jun |
| • Re: Maintaining State/Cached Connections | Todd Finney | 8 Jun |
| • Re: Maintaining State/Cached Connections | Jochen Wiedmann | 9 Jun |
| • Re: Maintaining State/Cached Connections | Stas Bekman | 9 Jun |
| • Re: Maintaining State/Cached Connections | Jochen Wiedmann | 10 Jun |
| • Re: Maintaining State/Cached Connections | Stas Bekman | 10 Jun |
