VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Server Memory
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ASPdummy
Starting Member

18 Posts

Posted - January 25 2005 :  00:58:24  Show Profile  Reply with Quote
I am running VPASP 3.5 on a dedicated Windows 2003 server with MS SQL on a separate server. When I look at my sites memory usage, I find that my VPASP sites use about 100mb of server memory on the average. My non-VPASP sites use about 5mb.

Does this sound right?!?

My sites run very fast and I do not want to use a sesson-less cart. With a dedicated server, MS SQL, and a dedicated SSL cert, VPASP runs very fast.

devshb
Senior Member

United Kingdom
1898 Posts

Posted - January 25 2005 :  04:06:22  Show Profile  Visit devshb's Homepage  Reply with Quote
I'm not too sure on the real nitty-gritty of how servers work when it comes to memory reservation/use, but I'd guess that it's probably a similar situation to how C programs reserve memory, in that it's probably not just the sessions that reserve the memory but also the definition of the variables/arrays within the vbscript; it's probably those arrays that kick-up the memory used more than the actual sessions.

And there are an awful lot of arrays defined in the common files, and some of them will be pretty darn large.

We're running loads of versions of vpasp on our site (purely for our own development areas where we develop our addons) and have never had any problems with memory since we moved to a decent host. Whether or not it's a problem will probably be 99% down to how generous your host is being with assigning memory to your server. We had massive memory problems with our old host, but when we switched to a host that gave a more realistic setup everything then worked perfectly. You might have paid a host for a dedicated server, but whether or not you've actually been given one, and whether it's been given a realistic amount of memory/space is another matter!

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on January 25 2005 04:07:31
Go to Top of Page

ASPdummy
Starting Member

18 Posts

Posted - January 26 2005 :  03:33:48  Show Profile  Reply with Quote
My server comes with 500mb of ram. I have each site in its own application pool. If a site exceeds 175mb of memory usage, I have it set to automatically recycle the pool. It was more of a problem when I was on shared hosting. I have been watching the memory usage in the task manager and it seems under control. But it looks as though VPASP is a big memory eater. I don't know that any other cart is any better. I am just concerned.

Go to Top of Page

keng
VP-ASP New User

152 Posts

Posted - January 28 2005 :  12:55:06  Show Profile  Reply with Quote
quote:

My server comes with 500mb of ram. I have each site in its own application pool. If a site exceeds 175mb of memory usage, I have it set to automatically recycle the pool. It was more of a problem when I was on shared hosting. I have been watching the memory usage in the task manager and it seems under control. But it looks as though VPASP is a big memory eater. I don't know that any other cart is any better. I am just concerned.



I also have this memory pool problem that causes my site to hang once in a while (not to mention that I use Access dabatase and have my site on a shared host server). But as per my hosting company (that helped me resolved the issue...)

"Your application is not hogging a large quantity, what it does is opens up a large number of threads to the processor and never closes them. These can be viewed as request lines to the processor. Most likely your script are not closing the database connection properly. Make sure that at the end of each script that uses a database connection you enter lines like these to close the connection and any recordsets:

myConn.close()
var myConn = 0

and

myRecordSet.close()
var myRecordSet = 0



Go to Top of Page

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - January 28 2005 :  21:14:15  Show Profile  Reply with Quote
Wow....

Keng's post is really significant. Has anyone who knows the code well (devshb?) confirmed this one way or the other? Does VP-ASP close DB access threads correctly?

I also use shared hosting with an Access database.

Just last week, I had trouble with my site at my web host. Only pure HTML pages would work. All ASP pages would hang. We tried it over and over and had customers try it as well. ASP pages only worked 50% of the time, and the problem seemed to cycle: working for a few minutes, and then not working.

Anyway, my host support team is very responsive and exchanged messages with us for several hours while they monitored the performance. In the end, they put my site in a separate resource pool and wrote: "I've isolated your website on its own application pool. This means that your website doesn't share resources with other websites. When other websites cause ASP to stall, your website shouldn't be affected and vise versa." As soon as they did this, my site started working fine again. In fact the ASP pages were noticably faster than ever before!

In my case, I think its likely that some other site was using too much resources. Rebooting the server did not solve it, and there weren't enough accesses to my site after the reboot for my cart to use the resources so quickly.

However, I do think Keng's post raises issues that should be evaluated.

Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - January 29 2005 :  03:25:33  Show Profile  Visit devshb's Homepage  Reply with Quote
I was told something similar by my old host once (we're no longer with that host), where they blamed the cart for not closing things down properly.

This may be true (ie there might be some instances where cursors/connections don't get closed down within vpasp; I haven't looked in detail as it's too convoluted and it could be anywhere), but then we ended up getting the same hanging problem when using any asp files even when they weren't part of any cart and just had a dummy open/close (which were properly checked/coded) to a normal (non-vpasp) database.

Anyway, the upshot was that the logical thing to do (rather than debug the whole cart) was to try another host.

My guess is that there might possibly be an obscure part of vpasp that somewhere doesn't close its corresponding cursor/connection, but that a decent server/host setup would be able to cater for this kind of thing (as it can easily happen in any code, not just in vpasp) without spiralling out of control.

Even if something's coded correctly, that doesn't necessarily mean that 100% of it'll run (eg if the user moves page mid-load etc; would that have the same effect as simply chopping the asp in logical-half and just running the first half?)

All the posts I've seen that relate to this seem to point to a hosting issue rather than a coding issue in my view; if I forgot to close a cursor/connection in a section of vbscript that I'd coded then I wouldn't expect it to break the whole site (and all the other sites on the server) - that'd be quite scary!

If it works fine on all hosts but one, and breaks the whole server on one particular host that has the same problems with non vpasp sites, then I'd definitely point the finger at the host.

keng's post is a really good one; that's a great explanation of the kind of potential gaps that might cause this, but I wouldn't want to go through a debugging process in conjunction with the host unless I was getting paid!

I'd assume that the setup of most hosts' operating systems would these days say something like "this guy's page has now loaded, so other than his session info I don't need any of his processes that are still open so I'll just kill them off" whereas other hosts where it spirals will just be keeping those processes open/running for some weird reason. Anyway, these are all just educated guesses on my part; if anyone wants to do a full debug/report on things then go for it, and good luck!

Never forget; the "cart" error might be completely spurious, and it could always be something as simple as the host's/server's memory getting overloaded by someone else's site or because the host is sharing a server between too many sites to try and save money.

My advice would be to try an exact copy of your whole site on a different host on a trial basis, and if everything works fine on the trial host but not on the real one, then simply jump-ship. That's what we did, as our old host broke everything with memory problems (vpasp, totally unrelated 3rd party stuff, and our own code), and on our new host everything works fine without us changing any code at all.

I do like keng's post, and the reply to it; they're both great pointers.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on January 29 2005 03:51:58
Go to Top of Page

monware
Starting Member

1 Posts

Posted - February 09 2005 :  03:58:17  Show Profile  Visit monware's Homepage  Reply with Quote
Take a look at http://monware.com/recycler.aspx . It is a great software that watches the IIS application pools and recycles it when an application pool hangs, stops or crashes.

Go to Top of Page

atari
Starting Member

30 Posts

Posted - February 10 2005 :  16:01:10  Show Profile  Reply with Quote
the answer is code smells, memory leaks.
You keep assigning new memory to objects, and never releasing the old ones. Poor coding is the answer. All objects should be
set object = nothing when they are done
all DB conn's should be closed when no longer needed.
that sorta junk.

also, cut down on redundant code, defacto defactor defactor

Go to Top of Page

epseja
VP-ASP New User

USA
61 Posts

Posted - February 23 2005 :  10:41:46  Show Profile  Reply with Quote
quote:

the answer is code smells, memory leaks. You keep assigning new memory to objects, and never releasing the old ones. Poor coding is the answer. All objects should be
set object = nothing when they are done
all DB conn's should be closed when no longer needed. that sorta junk.
also, cut down on redundant code, defacto defactor defactor



It's easy for anyone to say what should be happening in the code, but the question is whether or not anyone has anyone actually found a single point in the code where a visitor might trigger a connection to the database that remains unclosed. I would guess that if it exists, it would have to be in a place that is quite commonly visited and/or abandoned on the site in order to spur these problems regularly (i.e. searchresults.asp rather than shoptellafriend.asp). But then again, I'm not a very good programmer when it comes to DB related things.

My site has been locked up three times in three days because of this issue and I'm working with my host to try and get things fixed. I'll let everyone know if something is deiscovered.

Edited by - epseja on February 23 2005 10:42:09

Edited by - epseja on February 23 2005 10:42:46
Go to Top of Page

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - March 09 2005 :  16:52:06  Show Profile  Reply with Quote
quote:

My site has been locked up three times in three days because of this issue and I'm working with my host to try and get things fixed. I'll let everyone know if something is deiscovered.



Hi Epseja!

Have these problems been solved? What is the symptom you encounter when your site is "locked up?" Did you see this topic?:
http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=3424

Are you having similar issues to this, or is it completely different? If you are having similar issues, Support or I might be able to help.

Go to Top of Page

epseja
VP-ASP New User

USA
61 Posts

Posted - May 10 2005 :  13:57:29  Show Profile  Reply with Quote
quote:

Hi Epseja!

Have these problems been solved? What is the symptom you encounter when your site is "locked up?" Did you see this topic?:
http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=3424

Are you having similar issues to this, or is it completely different? If you are having similar issues, Support or I might be able to help.




Hello greatphoto!

The problem I'm having has definitely been pinpointed as a memory issue, so it doesn't have much similarity to the problems you've had (I think). I got in touch with my current host and they agreed to install a monitor (free of charge) that will restart the application pool if it finds that the site stops responding. It seems to have been working well for the past few months and I have my fingers crossed that it will continue to work well.

In the meantime, has anyone found any instances where there might be inclosed database connections eating up memory? Any tweaks that can be made would be most helpful. Thanks!

-Eric

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000