Re: Monitoring memory usage of an external component

2012-06-22 Thread Eugene Gavrish
> *Does anyone here use a tool to monitor memory usage by individual > processes (or groups thereof), and run commands when certain levels are met? > * I'd like to kill and restart my java service (through supervisor) when it > gets above a certain size. simple bash-script wi

Re: Monitoring memory usage of an external component

2012-06-21 Thread Cal Leeming [Simplicity Media Ltd]
Depending on the web application server you use, this can usually restrict the memory limit for you - uWSGI is a fine example of this. You can also use the 'poor mans' memory checks by checking the resident memory usage (not sure what that func is in Java), and checking if its over

Monitoring memory usage of an external component

2012-06-20 Thread Marcin Tustin
total usage of memory by all of my processes. *Does anyone here use a tool to monitor memory usage by individual processes (or groups thereof), and run commands when certain levels are met? * I'd like to kill and restart my java service (through supervisor) when it gets above a certain size. (I

Memory usage - Django + SQLITE

2009-09-14 Thread Ismail Dhorat
Hi Guys, My current setup for Django is as follows: Ubuntu, with Lighttpd and running django via FCGI using TCP in threaded mode. I a simple site, that uses SQLITE as the DB engine. Though i have noticed that as the DB grows, the memory usage for that particular process keeps increasing, is

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
On Aug 11, 9:08 am, Jumpfroggy wrote: > On Aug 10, 2:24 pm, dartdog wrote: > > > Big help!! Had just started getting using too much memory notices from > > Webfaction yesterday evening... > > Yeah, I didn't even pay attention till I hit about 120-140MB on my > 80MB plan and got everything turn

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
n I finally read > the description for something, it matches exactly what I'm looking > for.  I just didn't know where to look.  I just tried it, and yes my > memory baloons up to 16MB, then comes back down later.  The only > strange thing is that I set it to 10s (very short) to

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
27;t see much point for MaxRequestsPerChild. > > This just restarts the child after 5k requests, which helps clear out > some memory on occasion (I am still trying to get rrd or something run > on on Webfaction so I can actually map memory usage over time, and > start tuning Apache to

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Jumpfroggy
On Aug 10, 2:24 pm, dartdog wrote: > Big help!! Had just started getting using too much memory notices from > Webfaction yesterday evening... Yeah, I didn't even pay attention till I hit about 120-140MB on my 80MB plan and got everything turned off. Otherwise I would have just let it grow, not

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread dartdog
look.  I just tried it, and yes my > memory baloons up to 16MB, then comes back down later.  The only > strange thing is that I set it to 10s (very short) to test out, but it > takes a while for the process to actually be reclaimed.  If I put > inactivity-timeout=10, then load the

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Jumpfroggy
k. I just tried it, and yes my memory baloons up to 16MB, then comes back down later. The only strange thing is that I set it to 10s (very short) to test out, but it takes a while for the process to actually be reclaimed. If I put inactivity-timeout=10, then load the page, then close the browser

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Dj Gilcrease
for MaxRequestsPerChild. This just restarts the child after 5k requests, which helps clear out some memory on occasion (I am still trying to get rrd or something run on on Webfaction so I can actually map memory usage over time, and start tuning Apache to my actual usage needs better) >> WSGIPyt

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
On Aug 10, 8:44 pm, Dj Gilcrease wrote: > On Sun, Aug 9, 2009 at 4:17 PM, Graham > > Dumpleton wrote: > > On Aug 10, 6:07 am, Jumpfroggy wrote: > >> I'm hosting a bunch of django apps on a shared host with 80MB of > >> application memory (Webfaction in this case).  I've got a bunch of > >> app

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Dj Gilcrease
On Sun, Aug 9, 2009 at 4:17 PM, Graham Dumpleton wrote: > On Aug 10, 6:07 am, Jumpfroggy wrote: >> I'm hosting a bunch of django apps on a shared host with 80MB of >> application memory (Webfaction in this case).  I've got a bunch of >> apps that are very infrequently used, but need to be online.

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-09 Thread Graham Dumpleton
ic sites. > > However, I'd like to see what the bare minimum memory usage can be. > I've made sure DEBUG = False.  I also separated the static media to a > separate server with MEDIA_ROOT and MEDIA_URL.  When I first start > apache, the manager and worker processes use about 3

How do I minimize memory usage with WSGI and Apache?

2009-08-09 Thread Jumpfroggy
erverLimit 2". With the default, each app spawns 3 apache processes; one manager, 2 worker processes. With ServerLimit 1, there is only a manager and a single worker. This cuts down on a lot for low-traffic sites. However, I'd like to see what the bare minimum memory usage can be. I'

Re: fastcgi memory usage

2009-07-26 Thread Joshua Russo
On Sat, Jul 25, 2009 at 9:23 PM, Adi wrote: > > I'm running a couple of django sites on a VPS with nginx and fastcgi > and I'm a little concerned because of the memory usage. > According to the "free" command, each site uses about 50MB of RAM > (I'v

fastcgi memory usage

2009-07-25 Thread Adi
I'm running a couple of django sites on a VPS with nginx and fastcgi and I'm a little concerned because of the memory usage. According to the "free" command, each site uses about 50MB of RAM (I've ran free before and after starting the fastcgi daemons and each sites see

Re: Figuring out my memory usage for django + wsgi + apache prefork

2009-07-08 Thread Graham Dumpleton
On Jul 9, 3:44 am, Jumpfroggy wrote: > I'm running a bunch of django apps on my shared host with an 80mb > memory limit.  I have a bunch of very low-traffic sites I want to keep > running, but use as little memory as possible, so my goal is to > minimize the memory usage for e

Figuring out my memory usage for django + wsgi + apache prefork

2009-07-08 Thread Jumpfroggy
I'm running a bunch of django apps on my shared host with an 80mb memory limit. I have a bunch of very low-traffic sites I want to keep running, but use as little memory as possible, so my goal is to minimize the memory usage for each of these very small sites. I'm just starting to l

Re: Memory usage

2009-06-12 Thread Miles
On Jun 12, 4:43 am, Graham Dumpleton wrote: > > On Jun 12, 11:51 am, Miles wrote: > > If someone has an idea how to get memory usage at about the same with > > lower cpu cost than a full GC every request, please tell. > > In Python, garbage collecting is not real garbage

Re: Memory usage

2009-06-11 Thread Graham Dumpleton
t; > I used Dozer to see if anything leaked between requests: nope. Okay... > There are no objects alive, yet the memory usage rises after serving > requests; running JMeter to fire off infinite requests to apache > raised memory used from ~30M after 1 request to 200M+ after 250, >

Memory usage

2009-06-11 Thread Miles
o 20s. Easy fix: increase amount of processes, until you run out of ram. ps showed that each python process took at least 100M and half of them at 150M+, so getting past 60 processes was no go. I used Dozer to see if anything leaked between requests: nope. Okay... There are no objects alive, yet t

Re: Memory Usage on a VPS

2008-04-18 Thread Tim Sawyer
On Apr 18, 7:58 am, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I'm having trouble with Apache/Django memory usage on a Virtual Private > Server. I only have 150Mb memory. -snip- Thanks for your input folks, looks like I have some configu

Re: Memory Usage on a VPS

2008-04-18 Thread Graham Dumpleton
On Apr 18, 7:58 am, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I'm having trouble with Apache/Django memory usage on a Virtual Private > Server. I only have 150Mb memory. > > I've turned KeepAlive off. I think I'm using prefork (how do I

Re: Memory Usage on a VPS

2008-04-18 Thread Lucas Hazel
all SQL queries remain in memory. > > Best regards, > Valts. > > On Fri, Apr 18, 2008 at 12:58 AM, Tim Sawyer > <[EMAIL PROTECTED]> wrote: > > > > > Hi Folks, > > > > I'm having trouble with Apache/Django memory usage on a Virtual > > P

Re: Memory Usage on a VPS

2008-04-18 Thread Valts Mazurs
Definitely turn off DEBUG mode :) When DEBUG mode is on all SQL queries remain in memory. Best regards, Valts. On Fri, Apr 18, 2008 at 12:58 AM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > > Hi Folks, > > I'm having trouble with Apache/Django memory usage on a Virtual Private

Memory Usage on a VPS

2008-04-17 Thread Tim Sawyer
Hi Folks, I'm having trouble with Apache/Django memory usage on a Virtual Private Server. I only have 150Mb memory. I've turned KeepAlive off. I think I'm using prefork (how do I tell?) and it's set at the following: StartServers 2 Min

Re: Memory Usage/Optimization Question

2008-04-05 Thread Graham Dumpleton
drik Lundh wrote: > > > > > Garrett Garcia wrote: > > >> I recently got my first django project set up on webfaction and am > >> feeling the constraint of their memory usage limits. > >> For example: > > >> I have a view that returns a list of

Re: Memory Usage/Optimization Question

2008-04-05 Thread Eric Abrahamsen
t up on webfaction and am >> feeling the constraint of their memory usage limits. >> For example: >> >> I have a view that returns a list of objects: >> >> def get_meet_results(request, meet_id): >>meet = Meet.objects.get(pk=meet_id) >>year = m

Re: Memory Usage/Optimization Question

2008-04-05 Thread Fredrik Lundh
Garrett Garcia wrote: > I recently got my first django project set up on webfaction and am > feeling the constraint of their memory usage limits. > For example: > > I have a view that returns a list of objects: > > def get_meet_results(request, meet_id): > me

Memory Usage/Optimization Question

2008-04-05 Thread Garrett Garcia
I recently got my first django project set up on webfaction and am feeling the constraint of their memory usage limits. For example: I have a view that returns a list of objects: def get_meet_results(request, meet_id): meet = Meet.objects.get(pk=meet_id) year = meet.start.year

Re: File uploads with django - memory usage questions

2008-02-23 Thread shabda
Read that patch, but considering that this has not been merged, I think are soem known issues with this patch. Reading it, I cant figure out, what the pros, cons are. Any help? Suppose I do not apply this patch, the is there some way to specify that django not accept any file above a fixed size. O

Re: File uploads with django - memory usage questions

2008-02-23 Thread [EMAIL PROTECTED]
There is a ticket related to this: http://code.djangoproject.com/ticket/2070 there is a patch that based on the comments should work. On Feb 23, 2:48 pm, shabda <[EMAIL PROTECTED]> wrote: > I have a form which allows users to upload files. > > The form is, > class AddFileForm(forms.Form): > "

File uploads with django - memory usage questions

2008-02-23 Thread shabda
I have a form which allows users to upload files. The form is, class AddFileForm(forms.Form): """Add a file.""" filename = forms.FileField() I am using S3 to store files, my view is something like, if request.method == 'POST': addfileform = bforms.AddFileForm(request.POST, r

Re: mod_python, multiple django-sites, memory usage

2007-09-10 Thread Atilla
If you are considering running mod_fcgi systems, take a loot at mod_wsgi first. It's quite stable already, the setup is not any more difficult than mod_fcgi and it's a lot more easy to configure the finer details. Additionally, some simplistic tests show quite good performance, although that's yet

Re: mod_python, multiple django-sites, memory usage

2007-09-09 Thread Damodhar
hi I,am new one to django, I am very intrst to learn Django, so i install python latest verson, and try to install daango latest verson but it want;s's to configure .. mod_python module , can u help me am using WINDOWS XP SYSTEM now am working in PHP MYSQL USING XAMPLITE (APACHE +PHP + MYSQL Pa

Re: mod_python, multiple django-sites, memory usage

2007-07-24 Thread Graham Dumpleton
ng the lines of the extra effort involved in setting them up and maintaining them and any proxy in front. If the load is indeed light and you can validate your applications are multithread safe, then running each server with 'worker'

Re: mod_python, multiple django-sites, memory usage

2007-07-24 Thread Gábor Farkas
Graham Dumpleton wrote: > On Jul 24, 6:28 pm, Gábor Farkas <[EMAIL PROTECTED]> wrote: >> hi, >> >> how does it work exactly, when i have multiple django sites running in >> one apache server using mod_python? >> >> for example, imagine that i have 10 django sites running in one apache >> server. >

Re: mod_python, multiple django-sites, memory usage

2007-07-24 Thread Graham Dumpleton
On Jul 24, 7:53 pm, David Reynolds <[EMAIL PROTECTED]> wrote: > On 24 Jul 2007, at 10:35 am, Graham Dumpleton wrote: > > > Memory use of running multiple Django instances under Apache using > > mod_python is only one of the problems that can arise in this > > instance. Other problems are the abili

Re: mod_python, multiple django-sites, memory usage

2007-07-24 Thread David Reynolds
On 24 Jul 2007, at 10:35 am, Graham Dumpleton wrote: Memory use of running multiple Django instances under Apache using mod_python is only one of the problems that can arise in this instance. Other problems are the ability for the Django instances to interfere with each other due to C extension

Re: mod_python, multiple django-sites, memory usage

2007-07-24 Thread Graham Dumpleton
On Jul 24, 6:28 pm, Gábor Farkas <[EMAIL PROTECTED]> wrote: > hi, > > how does it work exactly, when i have multiple django sites running in > one apache server using mod_python? > > for example, imagine that i have 10 django sites running in one apache > server. > > does that mean, that in every

mod_python, multiple django-sites, memory usage

2007-07-24 Thread Gábor Farkas
hi, how does it work exactly, when i have multiple django sites running in one apache server using mod_python? for example, imagine that i have 10 django sites running in one apache server. does that mean, that in every apache process, i have 10 python interpreters loaded? or in other words

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread xgdlm
> > This week I decided to give a try to a new configuration. I'm now > > running django on lighttpd / fcgi and I have no swap at all. > > So I'm aware the mod_python is the prefered way to use django ... buy > > I'm quite happy with that new server configuration :) > > Can you give some more deta

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread Jeremy Dunck
On 3/30/07, xgdlm <[EMAIL PROTECTED]> wrote: ... > This week I decided to give a try to a new configuration. I'm now > running django on lighttpd / fcgi and I have no swap at all. > So I'm aware the mod_python is the prefered way to use django ... buy > I'm quite happy with that new server configu

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread xgdlm
Hello, I've notice the same memory consuption on my servers. I'm running django appz on 3 LVS loadbalanced mod_python apache http servers. If, for instance, I do a maintnance on one of the server Swap is increasing a lot on the two remaining servers, even if those two servers should handle the tr

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread Steven Armstrong
e memory dedicated just to it. > Instead their would generally only be a 5MB hit to the operating > system as a whole. Note though that I am only talking about code here > and not runtime memory usage. > > For mod_python.so though this unfortunately doesn't necessarily apply. &g

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread Graham Dumpleton
whole. Note though that I am only talking about code here and not runtime memory usage. For mod_python.so though this unfortunately doesn't necessarily apply. In the best case the mod_python.so file would be about 400KB in size and it would be shared as described above. If your Python install

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread Steven Armstrong
[EMAIL PROTECTED] wrote on 03/29/07 20:15: > I'm running a production Django application on two loadbalanced > webservers and a single, dedicated Postgres server handling around > 500k requests/day. I'm using memcached, and my database server > performance has been fantastic. > > Lately, I've bee

Re: Django/mod_python high memory usage - possible leak?

2007-03-29 Thread Malcolm Tredinnick
ld inefficiently designed views lead to memory > problems? I've made sure on my most popular pages that I'm only > importing what is absolutely needed, and I've even dereferenced > variables to try and help garbage collection. Unlikely. Profiling actively running Python pr

Re: Django/mod_python high memory usage - possible leak?

2007-03-29 Thread [EMAIL PROTECTED]
> ... Failing all else start > profiling. Coordinate those memory usage stats you have with what is > going on in the server to help narrow down where in your code to > look. Hope that helps and good luck. Is there a way of profiling mod_python with hotshot (or another tool) that

Re: Django/mod_python high memory usage - possible leak?

2007-03-29 Thread Adrian Holovaty
On 3/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > My most popular view looks for a memcached RSS feed, and if it doesn't > exist, uses URLLIB2 to go out and get it (then cache it). I've read > about possible problems with URLLIB2.openurl() that it might not free > the socket after use. I'

Re: Django/mod_python high memory usage - possible leak?

2007-03-29 Thread [EMAIL PROTECTED]
lease fall to their knees because the algorithms that worked well with low amounts of data get bogged down with large amounts of data. Failing all else start profiling. Coordinate those memory usage stats you have with what is going on in the server to help narrow down where in your code to look.

Django/mod_python high memory usage - possible leak?

2007-03-29 Thread [EMAIL PROTECTED]
I'm running a production Django application on two loadbalanced webservers and a single, dedicated Postgres server handling around 500k requests/day. I'm using memcached, and my database server performance has been fantastic. Lately, I've been hitting very high percentages of free memory used, an

Re: memory usage

2006-02-13 Thread Arthur
Mod_python 3.2.7 has been released which fixes a few memory related bugs (see http://www.modpython.org/live/mod_python-3.2.7/doc-html/node97.html). Among it "Fixed Multiple/redundant interpreter creation problem." Some people using Django probably trigger some of those bugs. So if low memory consu

Re: memory usage

2006-02-08 Thread Kenneth Gonsalves
he webserver (apache, lighttpd, other), and what method > are you using to connect django to it (mod-python, fast-cgi, > scgi, other)? If fast-cgi, how is your program started (apache > mod-fastcgi process manager, or standalone)? All of those could > have some impact on memory usage.

Re: memory usage

2006-02-08 Thread Jason F. McBrayer
fast-cgi, scgi, other)? If fast-cgi, how is your program started (apache mod-fastcgi process manager, or standalone)? All of those could have some impact on memory usage. Also, according to another recent thread on this list, DEBUG=True significantly increas

memory usage

2006-02-08 Thread Kenneth Gonsalves
hi, i have three django sites on a box. It is virtual hosting. The active memory allotted is 75MB. I am getting complaints that i am exceeding this memory. What can be done? as far as i can see, each time someone accesses the site, a new httpd process is started which takes up about 12 mb - 6