Forum Moderators: open

Message Too Old, No Replies

issues with PWS and mySql

didn't get answers on the mySql board

         

txbakers

12:32 pm on Aug 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wonder if someone can recognize this problem. I posted it first on a mySQL board, but no answer:

I have a very successful webbased application. I needed to show it offline, so I loaded it on my Windows 98 laptop with mySql, and the PWS. It worked beautifully, just as if I were online.

HOWEVER: two pages don't work, and I don't understand why.

The first query pulls a list of schools.

Then, as the rest of the page loads, a table is populated with 5 queries, using the one school as key. Then the program loops until the schools are EOF. We're using the same connection string, and as I said, it works perfectly when onLine. The error says that it can't connect to the mySQL database on localhost. Yet, it does connect for the top query.

Does anyone know what would cause something like this to happen? AND, what I can I do to work around it? I have an idea to combine the queries if needed, but it will make for a very confusing SQL statement.

I can provide the link and info for the online version, and might be able to post or attach the file if someone needs to look at it.

THANKS.

txbakers

5:19 pm on Aug 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Found the problem - it was connection leakage.

I was creating a new connection for every query, and NOT closing the connections until after the entire while loop.

So, I was maxing the connections on my poor little PWS. My real server has plenty of memory so I never noticed it.

Shame on me!

wkitty42

5:27 pm on Aug 15, 2003 (gmt 0)

10+ Year Member



Shame on me!

to say the least ;)

those can be hard ones to find... good job!