Re:

2016-02-03 Thread Denis Bellavance
Allright, Deploying with verbosity=0 solved my problem. Something is happening in that self.log( call at line 112 that make it crash on Heroku. Unsure what it is and unsure the issue is on Django side. At least this resolves my problem and there is some reference if someone else encounter th

Re:

2016-02-03 Thread Denis Bellavance
Hi, The "remote: Found another file with the destination path" is not actually an error, I actually have thousands of those and it is normal. It's simply suppose to be a warning that was added in version 1.9: https://github.com/django/django/commit/5304494585c58b0c9245ea9896a6d6122a8673a2 "Added

Re: Scaling Django

2016-02-03 Thread Erik Cederstrand
> Den 3. feb. 2016 kl. 22.30 skrev Joshua Pokotilow : > > At the startup where I work, we've written a lot of our server code in > Django. So far, we've adopted a "build it fast" mentality, so we invested > very little time in optimizing our code. A small amount of load testing has > revealed

Re: Is there a hook to run an SQL Query at every Postgres session start?

2016-02-03 Thread Bobby Mozumder
Thanks Simon this works great so far =^) -bobby > On Feb 3, 2016, at 12:34 PM, Simon Charette wrote: > > Hi Bobby, > > I'm not sure this is what you are looking for but it looks like > `connection_created`[1] signal might do. > > Cheers, > Simon > > [1] https://docs.djangoproject.com/en/1.9

Re: Scaling Django

2016-02-03 Thread Russell Keith-Magee
On Wed, Feb 3, 2016 at 11:30 PM, Joshua Pokotilow wrote: > At the startup where I work, we've written a lot of our server code in > Django. So far, we've adopted a "build it fast" mentality, so we invested > very little time in optimizing our code. A small amount of load testing has > revealed ou

Re: Scaling Django

2016-02-03 Thread Daniel Chimeno
As you said the project is using DRF for an API, it came to my mind some blog post I've read about it: - http://ses4j.github.io/2015/11/23/optimizing-slow-django-rest-framework-performance/ - https://www.dabapps.com/blog/api-performance-profiling-django-rest-framework/ - htt

Re: Scaling Django

2016-02-03 Thread orzodk
While optimizing the code will bring you improvements and you shouldn't stop doing this, for the most part (as noted from Rafael's resources) you should update your architecture to support Django in scaling. As you mentioned, instead of hitting the DB for every multi-second API call you scale it

Re: Scaling Django

2016-02-03 Thread Fred Stluka
Joshua, My team is producing a Django app with a small number of users, so we haven't worried too much about performance yet, but we know we may have to some day, so I've accumulated a list of ways to improve performance in a JIRA ticket for if/when it becomes

Re: Is there a hook to run an SQL Query at every Postgres session start?

2016-02-03 Thread Simon Charette
Hi Bobby, I'm not sure this is what you are looking for but it looks like `connection_created`[1] signal might do. Cheers, Simon [1] https://docs.djangoproject.com/en/1.9/ref/signals/#connection-created Le mercredi 3 février 2016 12:25:36 UTC-5, Bobby Mozumder a écrit : > > I'm looking to use

Is there a hook to run an SQL Query at every Postgres session start?

2016-02-03 Thread Bobby Mozumder
I'm looking to use PREPARE/EXECUTE statements, to eliminate my Query Planning time from every Web request. This can be done via SQL PREPARE/EXECUTE statements. But, Postgres only supports PREPARE statements on a connection session-by-session basis. To do this with Django, I need to be able t

Re: Scaling Django

2016-02-03 Thread Joshua Pokotilow
Thank you! I agree that we need to investigate before coming up with a solution. On Wednesday, February 3, 2016 at 11:11:04 AM UTC-5, Avraham Serour wrote: > > if your problem is the DB or network or small processor it won't help > rewriting the application. > The first step is to investigate th

Re: Scaling Django

2016-02-03 Thread Joshua Pokotilow
Thanks Remco. I'll look at High Performance Django. On Wednesday, February 3, 2016 at 11:05:11 AM UTC-5, Remco Gerlich wrote: > > There is a book (ebook) named "High Performance Django" that has many > useful tips. > > Also, new software developers are _always_ skeptical when they start a new >

Re: Scaling Django

2016-02-03 Thread Joshua Pokotilow
Thank you Sergiy! I agree that the code needs to be fixed. We don't have a Tomcat endpoint to compare with, although I did scare my coworkers a bit when we profiled a Django endpoint that took 300 - 400ms to return a response due (ostensibly) in large part to form object instantiation. Specific

Re: Scaling Django

2016-02-03 Thread Joshua Pokotilow
Thanks Bill. This was helpful. I understand that it's difficult to offer advice without too many specifics, so I'm hoping to get some high-level advice / examples of Django at scale, which you provided. Thank you! On Wednesday, February 3, 2016 at 10:49:51 AM UTC-5, Bill Blanchard wrote: > > Le

Re: Scaling Django

2016-02-03 Thread Larry Martell
I don't think there is a silver bullet that will fix all issues, nor any one technology stack that will. I have a fairly good size django app I built, and I did not consider performance all that much during initial development. As the user base and dataset started to grow I did see performance issu

Re: Scaling Django

2016-02-03 Thread Avraham Serour
if your problem is the DB or network or small processor it won't help rewriting the application. The first step is to investigate the problem, then you can have solution, sometimes people have a solution and then look for a problem, in your case they want to leave python and django and are looking

Re: WHERE EXISTS / WHERE NOT EXISTS clause without using QuerySet.extra

2016-02-03 Thread John P.
Sorry for the double-post, but I just searched the Django Developers group, and found this: "Using EXISTS instead of IN for subqueries" https://groups.google.com/forum/#!searchin/django-developers/WHERE$20EXISTS/django-developers/OG1unUV-MOU/VzkepyuaUDUJ and this: "Support server-side cursors for

Re: Scaling Django

2016-02-03 Thread Remco Gerlich
There is a book (ebook) named "High Performance Django" that has many useful tips. Also, new software developers are _always_ skeptical when they start a new job. They have an old way of doing things from their previous job, "that's not how we work here!" reflexes also from that old job, and they

WHERE EXISTS / WHERE NOT EXISTS clause without using QuerySet.extra

2016-02-03 Thread john . parton
Greetings! I'm trying to refactor a query to avoid using QuerySet.extra (as per the recommendation here: https://docs.djangoproject.com/en/1.9/ref/models/querysets/#extra) Here's a simplified version of my code: # testapp.models class Parent(models.Model): pass class Child(models.Model):

Re: Scaling Django

2016-02-03 Thread Joshua Pokotilow
The service uses the Django REST Framework and takes multiple seconds to return a response. The response is a JSON array with thousands of dictionaries. We haven't yet investigated why it's slow, nor have we tried to cache / memoize anything to speed it up. On Wednesday, February 3, 2016 at 10:

Re: Scaling Django

2016-02-03 Thread Sergiy Khohlov
Hello, Your first words have a answer. Swift coding always produces performance problem. This is expected. Looks like few new engineers use another one technology and would not like to use django. This a reason of his criticism. Mostly low performance is related to the DB performance. I'm

Re: Scaling Django

2016-02-03 Thread Bill Blanchard
Let's try to adress some of their concerns: - We need to move to a service-oriented infrastructure because Django is > too monolithic It depends on what your application does and what you're planning to do with it in the future. People are quick prescribe SOA as the end all way to scale, but th

Re: Scaling Django

2016-02-03 Thread Rafael E. Ferrero
Maybe I don't understand you very well, and for shure you have a very specific problem to solve... but... do you read something of this? http://blog.disqus.com/post/62187806135/scaling-django-to-8-billion-page-views https://www.digitalocean.com/community/tutorials/how-to-scale-django-beyond-the-ba

Re: Scaling Django

2016-02-03 Thread Avraham Serour
what do you mean by slow? can you measure in ms? On Wed, Feb 3, 2016 at 5:30 PM, Joshua Pokotilow wrote: > At the startup where I work, we've written a lot of our server code in > Django. So far, we've adopted a "build it fast" mentality, so we invested > very little time in optimizing our code.

Scaling Django

2016-02-03 Thread Joshua Pokotilow
At the startup where I work, we've written a lot of our server code in Django. So far, we've adopted a "build it fast" mentality, so we invested very little time in optimizing our code. A small amount of load testing has revealed our codebase / infrastructure as it stands today needs to run fas

Re: Provide me Links to learn django framework on Linux

2016-02-03 Thread Christian Ledermann
http://chimera.labs.oreilly.com/books/123400754/index.html On 3 February 2016 at 14:33, Rafael E. Ferrero wrote: > For Python > https://www.codecademy.com/learn/python > https://www.hackerrank.com/domains/python/py-introduction > > For Django > https://docs.djangoproject.com/en/1.9/ > > > > R

Re:

2016-02-03 Thread Sergiy Khohlov
Hello Denis, This issue is not related to the django-require. Look like you have two files (with same name ) at the different paths. New collect static is trying to colelct both files and can not decided which one should be used. Could you please send part of the section STATICFILES_DI

Re: Provide me Links to learn django framework on Linux

2016-02-03 Thread Rafael E. Ferrero
For Python https://www.codecademy.com/learn/python https://www.hackerrank.com/domains/python/py-introduction For Django https://docs.djangoproject.com/en/1.9/ Rafael E. Ferrero 2016-02-03 8:30 GMT-03:00 Ajay Sharma : > Hi everyone on the Group. > > I want resources and web links, where i can

Re: How to know our Django version

2016-02-03 Thread Tomas Tombakas
If you don't have access to the shell, why are you concerned with the django version? On 3 February 2016 at 13:05, wrote: > Hello, > > and if not ? > > i have actually only acces to the web part. > > Le mardi 2 février 2016 18:43:56 UTC+1, James Bennett a écrit : >> >> As long as you have access

Django getting slow with uwsgi

2016-02-03 Thread Arink Verma
Hi Django Experts. I have recently migrated my Django app to Django 1.8.8 since then I am experiencing low performance. With cProfiling I am have generated following breakdown of time spent. ncalls tottime percall cumtime percall filename:lineno(function) 49 22.0430.450

[no subject]

2016-02-03 Thread Denis
Hi, I'm looking at upgrading my application from 1.6 to 1.9.2... An issue I'm encountering now is that on Heroku, running collectstatic doesn't work on 1.9.2. The odd things is that if I try 1.8.7 instead, it work great... Running: remote: python manage.py collectstatic -i docs -i tests --noinp

ProgrammingError django_content_type already exists

2016-02-03 Thread M Hashmi
I've been stuck on this issue for a while now. If anyone have concrete solution please let me know. I subscribed for a VPS on DigitalOcean.com Ubuntu with OneClickDjango installation. Pre-loaded installation is 1.6.1 and when I upgrade it I get Programming Error django_content_type already exist

Provide me Links to learn django framework on Linux

2016-02-03 Thread Ajay Sharma
Hi everyone on the Group. I want resources and web links, where i can learn Django Framework On Linux platform as I am using Ubuntu for the development. Please help me . thank you to every one in Advance. >From Ajay . :) -- You received this message because you are subscribed to the

Re:Re: How to know our Django version

2016-02-03 Thread 林攀
django --version -- 林攀 在 2016-02-03 19:05:01,communicat...@domainedemanville.fr 写道: Hello, and if not ? i have actually only acces to the web part. Le mardi 2 février 2016 18:43:56 UTC+1, James Bennett a écrit : As long as you have access to a shell, you can do python manage.py she

Re: How to know our Django version

2016-02-03 Thread communication
Hello, and if not ? i have actually only acces to the web part. Le mardi 2 février 2016 18:43:56 UTC+1, James Bennett a écrit : > > As long as you have access to a shell, you can do > > python manage.py shell > > Then in the interpreter, do > > import django > print(django.get_version()) > > O