Re: Debugging DJango app on production for High CPU Usage

2016-03-02 Thread Web Architect
Integrated new Relic and seems to be good. Thanks for the suggestion. On Monday, February 29, 2016 at 3:20:43 PM UTC+5:30, Lloyd Dube wrote: > > New Relic. > > On Wed, Feb 24, 2016 at 6:59 AM, Web Architect > wrote: > >> Hi, >> >> We have an ecommerce platform based on

Re: Debugging DJango app on production for High CPU Usage

2016-03-02 Thread Web Architect
Hi James, Thanks for the detailed explanation. Certainly helps and I would embed logging to debug the CPU usage. Please find my comments inline: On Monday, February 29, 2016 at 2:45:41 PM UTC+5:30, James Schneider wrote: > > > On Tue, Feb 23, 2016 at 8:59 PM, Web Architect

Re: Debugging DJango app on production for High CPU Usage

2016-02-29 Thread Gabriel - Iulian Dumbrava
Hi! I have seen such a behavior on a couple of sites running an older version of Zinnia. It simply hit the 100% CPU usage on some queries. I would also suggest integrating New Relic. It gives you a pretty detailed information on where the CPU is spending most of the time. miercuri, 24

Re: Debugging DJango app on production for High CPU Usage

2016-02-29 Thread Sithembewena Lloyd Dube
New Relic. On Wed, Feb 24, 2016 at 6:59 AM, Web Architect wrote: > Hi, > > We have an ecommerce platform based on Django. We are using uwsgi to run > the app. The issue the CPU usage is hitting the roof (sometimes going > beyond 100%) for some scenarios. I would like to

Re: Debugging DJango app on production for High CPU Usage

2016-02-29 Thread James Schneider
On Tue, Feb 23, 2016 at 8:59 PM, Web Architect wrote: > Hi, > > We have an ecommerce platform based on Django. We are using uwsgi to run > the app. The issue the CPU usage is hitting the roof (sometimes going > beyond 100%) for some scenarios. I would like to debug the

Re: Debugging DJango app on production for High CPU Usage

2016-02-29 Thread Web Architect
The load is low - around 4-5 rps. I don't think that should effect the CPU usage so much. On Friday, February 26, 2016 at 9:57:42 PM UTC+5:30, Nikolas Stevenson-Molnar wrote: > > What sort of load are you experiencing in production? Is it possible that > you're simply running into a hardware

Re: Debugging DJango app on production for High CPU Usage

2016-02-26 Thread Nikolas Stevenson-Molnar
What sort of load are you experiencing in production? Is it possible that you're simply running into a hardware limitation and need to scale? On Thursday, February 25, 2016 at 9:29:22 PM UTC-8, Web Architect wrote: > > Hi Nikolas, > > Cache backend is Redis. The CPU usage is directly

Re: Debugging DJango app on production for High CPU Usage

2016-02-25 Thread Web Architect
Hi Nikolas, Cache backend is Redis. The CPU usage is directly proportional to the load (increases with the increase in load). Memory usage seems to be fine. Thanks. On Friday, February 26, 2016 at 3:32:23 AM UTC+5:30, Nikolas Stevenson-Molnar wrote: > > Which cache backend are you using?

Re: Debugging DJango app on production for High CPU Usage

2016-02-25 Thread Nikolas Stevenson-Molnar
Which cache backend are you using? Also, how's your memory usage? Do the spikes in CPU correlate with load? I.e., does the CPU use increase/decrease consistently with the number of users? On Wednesday, February 24, 2016 at 10:17:24 PM UTC-8, Web Architect wrote: > > Hi Nikolas, > > I am new to

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Nikolas, I am new to uwsgi. Top is showing CPU consumption by uwsgi. Following is my uwsgi configuration: master=True socket=:7090 max-requests=5000 processes = 4 threads = 2 enable-threads = true #harakiri = 30 (not sure if using this would be a good idea) stats = 127.0.0.1:9191 HW

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Will, In fact thats what I am doing currently. Also, trying to run the load as per the production (similar RPS etc based on reports from ngxtop). But unfortunately not able to generate the CPU usage spike on development (similar to production). Thanks. On Wednesday, February 24, 2016 at

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Javier, I am new to uwsgi. The CPU usage is what top is reporting. Is there a way to optimise uwsgi? Thanks. On Wednesday, February 24, 2016 at 7:06:34 PM UTC+5:30, Javier Guerra wrote: > > On 24 February 2016 at 13:18, Avraham Serour > wrote: > >> sometimes going

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Avraham, Please find my comments inline. On Wednesday, February 24, 2016 at 6:49:29 PM UTC+5:30, Avraham Serour wrote: > > > sometimes going beyond 100% > > how?? > > That's what I am trying to figure out :) > You can use django-debug-toolbar on your development machine, check the > logs

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Asif, The OS is CentOS 6 Linux - HW is a dual core processor. Running Django with uwsgi. uwsgi is configured with 4 processes and 2 threads (no logic behind the numbers but trying to find the optimal combination). I just ran top and was checking the CPU usage. Mostly two instances of uwsgi

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Nikolas Stevenson-Molnar
Just to be clear: is is the uwsgi process(es) consuming the CPU? I ask because you mention DB queries, which wouldn't impact the CPU of uwsgi (you'd see that reflected in the database process). On Tuesday, February 23, 2016 at 8:59:28 PM UTC-8, Web Architect wrote: > > Hi, > > We have an

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Will Harris
Hey Web Architect, I guess you never got that DB dump running in development? ;-) Why don't you run some profiling middleware to see if you can some traces of the production system? Or how about New Relic or some such? That's pretty good at helping to identify problems spots in your stack.

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Javier Guerra Giraldez
On 24 February 2016 at 13:18, Avraham Serour wrote: >> sometimes going beyond 100% > > how?? if it's what top reports, 100% refers to a whole core. a multiforking server (like uWSGI) can easily go well beyond that. and that's not a bad thing -- Javier -- You received

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Avraham Serour
> sometimes going beyond 100% how?? You can use django-debug-toolbar on your development machine, check the logs for the pages that take the longest to process and the one that are the most requested and start with those, of course your CPU won't be high but you should check and compare if there

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Asif Saifuddin
What is your server configuration and system usage statistics? On Wednesday, February 24, 2016 at 10:59:28 AM UTC+6, Web Architect wrote: > > Hi, > > We have an ecommerce platform based on Django. We are using uwsgi to run > the app. The issue the CPU usage is hitting the roof (sometimes going

Debugging DJango app on production for High CPU Usage

2016-02-23 Thread Web Architect
Hi, We have an ecommerce platform based on Django. We are using uwsgi to run the app. The issue the CPU usage is hitting the roof (sometimes going beyond 100%) for some scenarios. I would like to debug the platform on Production to see where the CPU consumption is happening. We have used