Forum Moderators: open
I have no choice at the moment but use Access as the database backend (no choice, really).
Realistically,
(1) can my site handle say 1000 pageviews daily if much of the content is pulled from Access tables? How about 5000 page views? Let's assume that the db is well designed.
(2) how many concurrent users can this site support at any given time?
(3) I have broken down the entire database into multiple independent mdb files to lighten up the load of each mdb. Will this help?
By the way, Iam using ADO 2.8, dsn-less.
When SQL Server is finally available, I'll migrate. But for now Iam really stucked with Access.
Hope you guys can help out.
Thanks.
If possible try to seperate the reading and writing databases and set up somekind of error handeling incaes you get a file locked/in use error.
Hope this helps a bit.
The writing part, that I didn't know about. There are only two situations where I need to write data:
1) During member registration, newsletter subscription.
So I need to a separate mdb to hold data for this procedure. Is that right?
2) During updating of the "article viewed XX times" counter.
So it would be best if I take out this procedure while Iam using Access because it can become a potential pitfall. Is this correct?
I really appreciate your answers. Helps me to make appropriate changes before problems occur.
1) During member registration, newsletter subscription.
So I need to a separate mdb to hold data for this procedure. Is that right?
If you use a separate "data input" db from your "content delivery" db, it will mean that if/when the "data input" db locks up, your content pages, using the other db, will probably still work.
2) During updating of the "article viewed XX times" counter.
So it would be best if I take out this procedure while Iam using Access because it can become a potential pitfall. Is this correct?
Yes take it out altogether. Most sites function effectively without having this "feature"... ;)
One last question:
When you say the mdb "will" crash during multiple i/o, what do you actually mean?
a) an error will occur to those sessions attempting db operations while the mdb is in use (writing, updating, deleting etc.)? but will be ok once again after the prior operation has completed?
b) or, the db will "die" and will become unusable? (Oh please, don't let this one be the answer...)
When you say the mdb "will" crash during multiple i/o, what do you actually mean?a) an error will occur to those sessions attempting db operations while the mdb is in use (writing, updating, deleting etc.)? but will be ok once again after the prior operation has completed?
b) or, the db will "die" and will become unusable? (Oh please, don't let this one be the answer...)
I've found that once a session gets an error, all sessions will get an error until:
1) there are NO transactions for roughly 30 seconds or
2) IIS is restarted
Access is not a database server. It's a wonderful desktop database, but will not handle the constant I/O of web traffic.
And migrating to a real database isn't just a matter of changing connection strings. Access handles the SQL language differently than SQL Server or other real databases.
Dates and Outer Joins are two major differences. Anything coded with date comparisons in Access will have to be recoded when you go to a real databse.
Any way around it? What if I setup an Application("dbinuse") = True before starting a db write/update and reset it to Application("dbinuse") = False after completion and check the flag status before committing any db operations? Will this solve the problem?
If yes, what do you think is the best approach to hold off further db ops when the db is busy? Timers, custom error message pages, redirects?
Again, thanks guys. You all have been great.
I'm on my second site that uses Access as the backend and so far not one problem. I have an e-commerce site that used Access 2000 for 3 years and not once did the db crash. this site gets about 500 unique visitors per day.
I built a blog site for someone else again using Access 2000 as the backend. This site received about 10000 unique visitors per week and again, Access did not crash in the 6 months I was involved in the site.
That being said, eventually you will need to upgrade, but there are a lot of specific things you can do to minimize/avoid problems. Here they are:
optimize ASP code
use OLEDB for the connection
optimize SQL queries
use separate db's for reading and writing data, if possible
use separate db's for different tables if table will be getting heavy use
try to compact database once per month
that's about it off the top of my head. if I think of any other tricks I used, I'll post back.
because most people have not attempted to use Access for their site, they just heard from other people that it's not a good db for the web.
I guess I'm the exception then. I started with access and watched my site slow and slow and slow until it was unusable and I had to restart IIS every time.
I lost a very good customer due to this. I was on their site and she told me that it was slow, could I take a look. I looked and was appalled about how bad it was.
The very next weekend I migrated to mySQL and NEVER had a problem since. That was over 3 years ago.
Access is NOT a server database and never will be, no matter how well you optimize. It's not designed for that.
The inputs you have given is already tremendous help. If there are still things I need to know, please do post it here. I will be forever gratefull.
About 2 years ago I was 'given' a database server with SQL Server 2000 on it, and I now would/could never go back. Having Enterprise Manager running on my desktop makes things so much easier.
Why don't you set up a simple experiment to see if and when it will fail:
Create a pages called 1.asp that writes a lot of information to the database (maybe in a numbered loop) so that it takes about a minute to complete.
Now create 2.asp that quickly reads a small line from the same database.
Now open 2 brownser windows. In the first window, open 1.asp and in the second window open 2.asp a few seconds after opening the 1.asp page.
From my experience, what will happen is that 2.asp will fail with a "file in use" error until 1.asp is completed, at which time 2.asp will work fine.
because most people have not attempted to use Access for their site
I started my first commerce with with access back in 97. It worked ok for the first year but started to have problems when I got to 50K page views per month or when a crawler came chuggin along. So I upgraded...
brickwall, once you have your site ready for testing go out and find yourself a multi threaded stress tool. I know MS has one called the WCAT. Point it at your site and unleash some heavy duty test scripts to see just how it holds up under the scenarios that you're describing. Then pound it with 10 times what you think you'll get for traffic. The idea is to find a point where your application will break so that you'll know when it's time to either reboot or upgrade to a differnt database.
you used Access 97? no wonder you had problems. Access 97 was a piece of crap! My db was corrupting once a week with Access 97.
My suggestion was to use Access 2000 or above and to do all the optimization I suggested. Only then can you avoid problems with Access.
Access becomes more unstable when there are about 5 or 6 concurrent connections. Given that the connections are only there for as long as the ASP page is being run, the average connection time will be in the range of several milliseconds.
Suppose you get 10 pageviews a second, the chance of 5 of them accessing the database at the same time is still pretty low.
10 visitors per second equals 864,000 pageviews a day, or 25.92 million pageviews a month. Once you reach that number, you should be able to rent a dedicated server off your advertising income...
Its the light version of sqlserver and works fine. If you have a lot of access specific functions or views you can also work with "linked tables", i tested it on a complex access database and it works pretty good.