PDA

View Full Version : ASP funkiness


Freakish
05-07-2003, 03:20 AM
ASP/IIS is close enough to PHP/Apache... :p

So, I'm working on this little series of asp pages to mess with info from a database at work. This is just a little (local) project to make things easier, so it's not an option to go installing php or anything - I'm stuck with ASP and ADO.

I must be missing something very basic, because I'm getting the strangest intermittent error. Everything will work fine for awhile after I get started and then all of a sudden the page will not load and it'll give me an "Unspecified error" from the line where it connects to the database. If I wait a few minutes, the page will load once or twice before pooping out again.

The machine is Win2k, and everything's up to date.

From what I dug up, I thought it was my leaving out the un/pw string (db is unprotected - don't need it as this a local thing), but adding that to the connect didn't help.

My guess is that this has something to do with Win2k's hard-coded connection limit of 10? Maybe somehow earlier connections from my testing aren't getting dropped fast enough so I get denied as the server sees 10 connections in progress? I've tried decreasing the session times down to 5 seconds or so but this still hasn't helped.

Has anyone had this problem before? Any ideas on what I'm missing? I have a feeling it's right in front of me and I'm just not seeing it... I'm such a n00b at this...

Kingster
05-07-2003, 06:39 AM
What DB are ya using Freak? MS-SQL?

As far as the Win2K user limit, that COULD be doing it, as by turning on IIS, you've turned on 2 more accounts and are using them when you connect to the IIS box... Then the Connect to the DB, is another user... Plus the connection that you've made onto the webpage... So you for sure have 4 connections going, and if you are signed in on the box, that's five, and so now you have 5 connections left.

How long is it taking to drop the database connections you open? If you are debugging, you are prolly going into the database, then you are "breaking" out of the ASP cuz you saw something wrong... And then when you try to run it again, since you haven't "closed" that DB connection, you're running yourself out of connections.

God help you if you are using MS Access for your DB.

Squirrelinabox
05-07-2003, 10:13 AM
are you closing your connections after you use them?

You will get errors if you open a connection do your stuff, then later on open another connection and do your stuff, and keep doing that. Pretty soon it will bog down the database or it will run out of connections and it will go boom.

Probably need a bit more info to know what it is though.

Freakish
05-07-2003, 11:29 AM
Yup..it's Access. Because that's what we've got on all the machines (we've got filemaker too but not installed on this one or the one it's going to live on when done).

The access db actually has to be closed for any of the webpages to work otherwise the file gets locked and none of the webpages will be able to read it.

Yeah, I'm pretty sure I close everything out at the end. rs.close, conn.close ...

I'll try some testing when I head in this afternoon to see if I can get some numbers.

And wow, I didn't know the connections added up like that. BS. grrr... php/mysql is so much easier.

Squirrelinabox
05-07-2003, 11:44 AM
oh dear god no, asp is WAY better than php!

If you can get .Net going that is even better. I like .Net so much more than php.

Kingster
05-07-2003, 04:19 PM
Originally posted by Squirrelinabox
oh dear god no, asp is WAY better than php!

If you can get .Net going that is even better. I like .Net so much more than php. HUGE price difference though.... ;)