First off, mod_wsgi in daemon mode with apache should be a decent deployment method for ram consumption. I don't think your problem is there.
When you say the memory usage is 650mb, what is actually using all that memory? Is it httpd processes? The mod_wsgi processes? On Thu, Nov 11, 2010 at 1:49 PM, Josh <[email protected]> wrote: > Oh yeah my urls looks like this: > > from django.conf.urls.defaults import * > from store.urls import urlpatterns > > urlpatterns += patterns('', > ('^pages/', include('django.contrib.flatpages.urls')), > (r'^product_info\.php', 'store.localsite.views.old_redirect'), > (r'^searchRedirect/', 'store.localsite.views.redirect_search'), > (r'^reports/', 'store.localsite.views.reports.view'), > ) > > and I have local_dev and debug set to false. (searchRedirect and the > product_info\.php above were set up to redirect because the site used > to be osCommerce based). > > On Nov 11, 11:46 am, Josh <[email protected]> wrote: >> It is centos but we are using apache and mod_wsgi in daemon mode, here >> is the relevant part of my apache conf: >> ------- >> >> Alias /static/ /home/hatikva/store/static/ >> >> <Directory /home/hatikva/store/static> >> Order deny,allow >> Allow from all >> </Directory> >> >> Alias /media/ /usr/local/lib/python2.6/site-packages/django/contrib/ >> admin/media/ >> >> <Directory /usr/local/lib/python2.6/site-packages/django/contrib/admin/ >> media> >> Order deny,allow >> Allow from all >> </Directory> >> >> WSGIDaemonProcess hatikva.com user=hatikva group=hatikva python-path=/ >> usr/local/lib/python2.6/site-packages >> WSGIProcessGroup hatikva.com >> WSGIScriptAlias / /home/hatikva/store/apache/store.wsgi >> >> ------- >> >> My understanding is that the way the static directory is set up above >> means that apache and not django serves media. >> >> As I have watched the memory usage has continued to go up, its now at >> ~650m, up from ~220m (I have stopped refreshing and this has happened >> in the past 20 minutes or so). >> >> I am open to recommendations as to a better setup (which I may or may >> not be able to do depending on the person I have made the site for). >> Thanks for the quick response! >> >> -Josh >> >> On Nov 11, 11:39 am, Laszlo Antal <[email protected]> wrote: >> >> > Hi, >> >> > Could you check to make sure django does not serve static media? >> > I had a very similar issue (4000+ products) and I left by accident the >> > static_serve in urls.py >> > Just a thought >> >> > lzantal >> >> > On Nov 11, 2010, at 11:30, Josh <[email protected]> wrote: >> >> > > I have been working on a satchmo site with ~3000 products that has >> > > repeatedly over the past week or so crashed the server it is running. >> > > It is on a VPS with 2G dedicated ram. It seems that once the httpd >> > > process allocates memory it never releases it, eventually taking all >> > > available memory and crashing the server. I tried opening about ten >> > > pages from the site and repeatedly hard refreshed them and watched the >> > > memory usage (via top) shoot up more than 150m in about 10 minutes, >> > > its still going up as I write this. >> >> > > Are there any known memory leaks in satchmo? Why would memory usage >> > > continue to go up after I have stopped hard refreshing? (I guess it >> > > is possible that other people are visiting the site but every two >> > > second or so it seems to go up about 1m, which if it continues the >> > > server will crash again). Thanks in advance for any help. >> >> > > -Josh >> >> > > -- >> > > You received this message because you are subscribed to the Google >> > > Groups "Satchmo users" group. >> > > To post to this group, send email to [email protected]. >> > > To unsubscribe from this group, send email to >> > > [email protected]. >> > > For more options, visit this group >> > > athttp://groups.google.com/group/satchmo-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
