Well, I can tell you that "10061" is "Connection refused" under WinSock (the Windows Socket layer, a.k.a. TCP/IP for Win32). Based on "host=localhost;port=80", this almost always means that there is nothing that is listening to port 80 of localhost. Port 80 is usually used by the web server. Is MySQL really using that port number on the same computer as your web server is running on (that just seems strange to me)?
Mostly FYI, a common misunderstanding about TCP/IP is that people don't realize that a server process can listen not just to a port number but also to a specific combination of address and port number. So a common mistake with TCP/IP servers is to have the server specify which address it is to be contacted at rather than specifying only the port number (that is, specifying an address of INADDR_ANY). So it is possible to have a server process that can be contacted when you use its name (or IP address) but that will give "connection refused" if you try to access it as "localhost".
I don't see any smoking guns for the particular error that you are getting, but I'll mention a couple more things that seem strange.
since that code happens at run time, it won't have any effect on any subsequent use statements (which happen at compile time). It could change where subsequent require statements look for modules, but that code is followed only by use statements, not require statements, so it is useless in this snippet.($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1");
Also, one difference between mod_perl and the other situations you mentioned is that the run-time pass happens over and over via some trickery about putting all of your code inside of a sub. So this probably means that in mod_perl the above code actually gets run over and over again and @INC gets very, very full.
So you should really but that code inside a BEGIN block.
I thought one of the big points of mod_perl was that you could intelligently cache and reuse your DBI connections, saving lots of time-consuming reconnecting for every single page hit. I suggest you look into an appropriate module for doing that.
- tye (but my friends call me "Tye")In reply to (tye)Re: mod_perl breaks MySQL connectivity...
by tye
in thread mod_perl breaks MySQL connectivity...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |