Re: Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
I'm unsure what you mean - do you mean "are we executing raw SQL queries 
and a Python db api, or using Django's ORM?"   If so, usually the latter 
but this is definitely not a problem of poorly written queries, we've 
profiled them.

- Andy

On Saturday, 20 February 2021 at 17:44:45 UTC jmccla...@gmail.com wrote:

> are you using django directly to run the queries or are you querying the 
> db. I had a similar problem a while back with a project and the load was 
> resolved by letting python do the work.
>
>
>
> On Sat, 20 Feb 2021 at 15:23, Andy Robinson  wrote:
>
>> Hi all,
>>
>> We're maintaining an application that is hitting scaling problems.   It 
>> helps run grass-roots sporting events all over Europe, so Saturdays can 
>> produce large and unpredictable loads, with both logged-in users and public 
>> viewers. Despite a powerful server seemingly being lightly loaded (htop 
>> suggests just 3-6 out of24 cores typically busy, and free memory 
>> available), it often "hangs" for long periods - simple requests return 
>> after 10sec, and at times we have had to restart nginx.   
>>
>> If anyone here has experience of this configuration under high loads, 
>> we'd be keen to hire an experienced expert to review and check we are not 
>> doing anything stupid with our nginx or uwsgi configuration.  
>>
>> Likewise, if you really know how to cache Django with nginx, and work 
>> around the various cookies and language settings so that logged-in pages 
>> still work but anonymous ones can be cached, we'd love to get a bit of 
>> help  
>>
>> Architecture is ubuntu 18.04, Django 3.0.12, with MariaDB and Mongo back 
>> ends used for slightly different things.
>>
>> Feel free to contact me by private email if you,
>>
>> Otherwise, if people have suggestions and questions here, I'll try to 
>> share what I can and am very grateful for any help...
>>
>> Best Regards
>>
>>
>> Andy Robinson
>>  
>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/4fcc006e-37bb-4497-a692-45dfb99bfad1n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> John McClain
>
> Cell: 085-1977-823
> Skype: jmcclain0129
> Email: jmccla...@gmail.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1aa1c853-8028-4f58-8c40-bf966caa5e56n%40googlegroups.com.


Re: Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
Thanks for this.  27k file descriptors out of about 370k allowed.  I 
presume that means this isn't a problem?

(We run a lot of different virtual hosts on this box, each with a few 
Django processes)

- Andy
On Saturday, 20 February 2021 at 16:15:12 UTC mob...@aldian.net wrote:

> Check the number of open file descriptor when you experienced the slow 
> response.
>
> On Sat, Feb 20, 2021 at 10:23 PM Andy Robinson  
> wrote:
>
>> Hi all,
>>
>> We're maintaining an application that is hitting scaling problems.   It 
>> helps run grass-roots sporting events all over Europe, so Saturdays can 
>> produce large and unpredictable loads, with both logged-in users and public 
>> viewers. Despite a powerful server seemingly being lightly loaded (htop 
>> suggests just 3-6 out of24 cores typically busy, and free memory 
>> available), it often "hangs" for long periods - simple requests return 
>> after 10sec, and at times we have had to restart nginx.   
>>
>> If anyone here has experience of this configuration under high loads, 
>> we'd be keen to hire an experienced expert to review and check we are not 
>> doing anything stupid with our nginx or uwsgi configuration.  
>>
>> Likewise, if you really know how to cache Django with nginx, and work 
>> around the various cookies and language settings so that logged-in pages 
>> still work but anonymous ones can be cached, we'd love to get a bit of 
>> help  
>>
>> Architecture is ubuntu 18.04, Django 3.0.12, with MariaDB and Mongo back 
>> ends used for slightly different things.
>>
>> Feel free to contact me by private email if you,
>>
>> Otherwise, if people have suggestions and questions here, I'll try to 
>> share what I can and am very grateful for any help...
>>
>> Best Regards
>>
>>
>> Andy Robinson
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/4fcc006e-37bb-4497-a692-45dfb99bfad1n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c2093676-90f5-4e69-b646-868102361d18n%40googlegroups.com.


Re: Django/uWSGI/nginx under load

2021-02-20 Thread John McClain
are you using django directly to run the queries or are you querying the
db. I had a similar problem a while back with a project and the load was
resolved by letting python do the work.



On Sat, 20 Feb 2021 at 15:23, Andy Robinson  wrote:

> Hi all,
>
> We're maintaining an application that is hitting scaling problems.   It
> helps run grass-roots sporting events all over Europe, so Saturdays can
> produce large and unpredictable loads, with both logged-in users and public
> viewers. Despite a powerful server seemingly being lightly loaded (htop
> suggests just 3-6 out of24 cores typically busy, and free memory
> available), it often "hangs" for long periods - simple requests return
> after 10sec, and at times we have had to restart nginx.
>
> If anyone here has experience of this configuration under high loads, we'd
> be keen to hire an experienced expert to review and check we are not doing
> anything stupid with our nginx or uwsgi configuration.
>
> Likewise, if you really know how to cache Django with nginx, and work
> around the various cookies and language settings so that logged-in pages
> still work but anonymous ones can be cached, we'd love to get a bit of
> help
>
> Architecture is ubuntu 18.04, Django 3.0.12, with MariaDB and Mongo back
> ends used for slightly different things.
>
> Feel free to contact me by private email if you,
>
> Otherwise, if people have suggestions and questions here, I'll try to
> share what I can and am very grateful for any help...
>
> Best Regards
>
>
> Andy Robinson
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4fcc006e-37bb-4497-a692-45dfb99bfad1n%40googlegroups.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_q%3DH4D4%3DcDr9GJWR5j2WU%3DkCwRW-xKaQGBdK25Ca1m13g%40mail.gmail.com.


Re: setting up urls of many apps

2021-02-20 Thread Jorge Gimeno
On Wed, Feb 17, 2021 at 11:00 PM RANGA BHARATH JINKA <
bharathjink...@gmail.com> wrote:

> Hi,
>
> Please follow these docs
> https://docs.djangoproject.com/en/3.1/ref/urls/#include
>
> On Thu, Feb 18, 2021 at 12:12 PM Peter Kirieny 
> wrote:
>
>> if self.pattern.name is not None and ":" in self.pattern.name:
>> TypeError: argument of type 'type' is not iterable
>>
>> that's the error
>>
>> On Thu, 18 Feb 2021 at 09:39, Peter Kirieny 
>> wrote:
>>
>>> thanks sir
>>> that's done though the error still persists
>>>
>>> On Thu, 18 Feb 2021 at 09:32, RANGA BHARATH JINKA <
>>> bharathjink...@gmail.com> wrote:
>>>
 Hi,

 Please check namespace='core' in project urls.py. For shops app also
 namespace is same. Please change this namesapce to Shops.

 All the best

 On Thu, Feb 18, 2021 at 11:56 AM Peter Kirieny 
 wrote:

> in the projects urls.py
>
> from django.conf import settings
> from django.conf.urls.static import static
> from django.contrib import admin
> from django.urls import path, include
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('accounts/', include('allauth.urls')),
> path('', include('core.urls', namespace='core')),
> path('Shops/', include('Shops.urls', namespace='core')),
>
> ]
>
> if settings.DEBUG:
> import debug_toolbar
> urlpatterns += [path('__debug__/', include(debug_toolbar.urls))]
> urlpatterns += static(settings.MEDIA_URL,
>   document_root=settings.MEDIA_ROOT)
> urlpatterns += static(settings.STATIC_URL,
>   document_root=settings.STATIC_ROOT)
>
>
> in the app's urls.py
>
> from django.urls import path
> from .views import ShopsView
>
> app_name = 'Shops'
>
> urlpatterns = [
> path('Shops/', ShopsView.as_view(), name=ShopsView)
>
>
> On Wed, 17 Feb 2021 at 17:52, Nicolas nasr  wrote:
>
>> Can  you please show your urls.py file
>>
>> On Wednesday, February 17, 2021 at 8:31:50 AM UTC+2
>> kirien...@gmail.com wrote:
>>
>>> someone to help me to set up urls of two different apps in django
>>> project please, i keep on getting errors
>>> am new
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/635506c8-35bc-4c76-a937-c992dd1312dbn%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL8t8eoNg68Qd%3DC3OYWonaLs%3DvAKcnzDFxxbrcNK65BJ%3DtnwnQ%40mail.gmail.com
> 
> .
>


 --
 Thanks and Regards

 J. Ranga Bharath
 cell: 9110334114

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAK5m316xfF43VCU%2B6NczvpHPxSKeRsg7XFQa3GpAfHKaf2JENg%40mail.gmail.com
 
 .

>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAL8t8epM3Y9_twr%2Bg83wkYXAaHCjD3MY03RY%2B28QS8BYO2DVEA%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Thanks and Regards
>
> J. Ranga Bharath
> cell: 9110334114
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving 

Re: Immediately Need Help

2021-02-20 Thread Chetan Ganji
 Shubham is right. However, as no row will be deleted.
Also, the code created once will never be assigned to any other space.
It wont matter!

Formula : LM-categorycode-citycode-current_index
e.g. "LM-CW-DELHI-1"
# Remove dashses from the string, they are added only to make it easier to
understand

String after the citycode is called as current_index and it has to be of a
standard length
e.g. 9. We will call this length as Z_FILL_INDEX. You can modify this
Z_FILL_INDEX as required.
Hence, Z_FILL_INDEX = 9. In above example, current_index = "1"

As no row will be deleted, also, the code created once will never be
assigned to any other space
Hence, current_index will be 1 or plus 1 of the latest one
Below code is for django ORM, IDK sqlalchemy version of it :P
I dont see how Space is related to a City, you can figure that part
yourself.
if current_index > 9, code will break. 10 Cr is a big no.
However, if current_index could be bigger than that, pick a bigger no for
Z_FILL_INDEX.

In case you run out of index in the future, you can write a script to add
few extra zeros
to current index part of the code or add pick a bigger no for Z_FILL_INDEX
initially e.g. 12.

MUST DO : ADD UNIQUE CONSTRAINT ON THE name FIELD OF THE Spaces Model.
Z_FILL_INDEX = 9

last_code = Spaces.objects.filter(space_category="blah").order_by(
"-created_at").first()
if last_code is None:
current_index = "1".zfill(Z_FILL_INDEX)
else:
current_index = str(int(last_code[-Z_FILL_INDEX:]) + 1)

unique_code ="LM" + categorycode + citycode + current_index




Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Fri, Feb 19, 2021 at 6:16 PM shubham vashisht 
wrote:

> If there are 4 rows which have categorycode="blah" and
> citycode="blah-blah", then the space code will be something like this,
> LMblahblah-blah1, LMblahblah-blah2, LMblahblah-blah3, LMblahblah-blah4.
> But if you delete row with spacecode different from LMblahblah-blah4, then
> your code will generate space code LMblahblah-blah4
>
> On Fri, 19 Feb 2021, 16:07 Chetan Ganji,  wrote:
>
>> Yes kritika show all the models.
>>
>> How shubham?
>> If an entry is deleted, unique code will also be deleted. Next time it
>> gets generated, it might be assigned to different entry, but it still be
>> unique.
>>
>> As kritika clarified already, so it wont be a problem.
>>
>> On Fri, Feb 19, 2021, 3:58 PM shubham vashisht 
>> wrote:
>>
>>> Chetan
>>> If any row is deleted from the table, then your logic will fail to
>>> return the unique code
>>>
>>> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>>>
 Hi Kritika

 Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 

 Teko field pe unique constraint lagana padenga

 Teko no wapas 1 se start karneke liye query maarana padenga

 last_no = Model.objects.filter(categorycode="blah",
 citycode="blah-blah").count()

 unique_code ="LM" + categorycode
 + citycode + str(last_no + 1)


 Aisa code likkha toh result milenga 


 On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
 wrote:

>  I have to create a unique code for each space saved in dbAb db me
> save krne k lie, wo multiple part me save ho rha hai, multiple models bhi
> hai uske.1st model se mujhe space category ka name uthana hai
> 2nd se city code
> Category alag alg ho skti hai
> To code genrate hoga LM-categorycode-citycode-1Next time jb
> category, B hogi to number 1 se hi start hoga, ni to category same hai to
> fr se 2 allot ho jaega
> Eg Category - CW, COM
> City - Noida, DelhiSpace 1 - Cw category
> Code space 1- LMCWNoida1Space2 - CW Category
> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
> CODE SPACE 3- LM-COM-NOIDA0001
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/690debd2-46e0-497f-92a8-3abbc391b97dn%40googlegroups.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%40mail.gmail.com
 
 .

>>> 

Re: Application for Part Time Python Developer Job

2021-02-20 Thread Clifford Okorie
Please I also need a part time Python/Django job. Please can I contact you
through the email. Thank you

On Sat, Feb 20, 2021, 16:46 mubashar ilyas  wrote:

> Hi Chetan Ganji,
> contact me for the part time job of django python
> cont...@confiatech.com
>
> On Thu, Feb 18, 2021 at 2:56 PM Chetan Ganji 
> wrote:
>
>> Hi Djangoists,
>>
>> I am looking for Part Time work as Python Developer.  I can work 4 hrs
>> everyday or 80 hrs every month.
>>
>> I have 2+ years experience in Web Development. I can hack my way through
>> Python 3, Django and Django REST Framework.
>> I can build you rest apis using Django and DRF. I can provide prod grade
>> code quality in these techs.
>> I can show samples of code to anyone who might wanna hire me.  Please see
>> my resume for my previous experience.
>>
>> Please let me know if you have any opportunities for me or any questions.
>> However, send me a personal email.
>>
>> Thanks!
>>
>>
>> Regards,
>> Chetan Ganji
>> +91-900-483-4183
>> ganji.che...@gmail.com
>> http://ryucoder.in
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMKMUjvNDvi%2BuTyqAcfWLC5YLpJKe84FoUTFp7xAM2ixy%2BukOQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BLLMZa7iifq%2BdG5ZD_k%2BY--UCp4%2B2ZAaAbQRs_eBh0xTY4xOA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEKe8057CNix%2BxB6YiswSrj6NVgLz27E1C8bRi_EjRqfV7eFBw%40mail.gmail.com.


Re: Django/uWSGI/nginx under load

2021-02-20 Thread Aldian Fazrihady
Check the number of open file descriptor when you experienced the slow
response.

On Sat, Feb 20, 2021 at 10:23 PM Andy Robinson  wrote:

> Hi all,
>
> We're maintaining an application that is hitting scaling problems.   It
> helps run grass-roots sporting events all over Europe, so Saturdays can
> produce large and unpredictable loads, with both logged-in users and public
> viewers. Despite a powerful server seemingly being lightly loaded (htop
> suggests just 3-6 out of24 cores typically busy, and free memory
> available), it often "hangs" for long periods - simple requests return
> after 10sec, and at times we have had to restart nginx.
>
> If anyone here has experience of this configuration under high loads, we'd
> be keen to hire an experienced expert to review and check we are not doing
> anything stupid with our nginx or uwsgi configuration.
>
> Likewise, if you really know how to cache Django with nginx, and work
> around the various cookies and language settings so that logged-in pages
> still work but anonymous ones can be cached, we'd love to get a bit of
> help
>
> Architecture is ubuntu 18.04, Django 3.0.12, with MariaDB and Mongo back
> ends used for slightly different things.
>
> Feel free to contact me by private email if you,
>
> Otherwise, if people have suggestions and questions here, I'll try to
> share what I can and am very grateful for any help...
>
> Best Regards
>
>
> Andy Robinson
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4fcc006e-37bb-4497-a692-45dfb99bfad1n%40googlegroups.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAbNUw2UEUH4g6_xf%2B4HYrvK_Vrdj5QObUE6BFbEDLMHwQ%40mail.gmail.com.


Re: Application for Part Time Python Developer Job

2021-02-20 Thread mubashar ilyas
Hi Chetan Ganji,
contact me for the part time job of django python
cont...@confiatech.com

On Thu, Feb 18, 2021 at 2:56 PM Chetan Ganji  wrote:

> Hi Djangoists,
>
> I am looking for Part Time work as Python Developer.  I can work 4 hrs
> everyday or 80 hrs every month.
>
> I have 2+ years experience in Web Development. I can hack my way through
> Python 3, Django and Django REST Framework.
> I can build you rest apis using Django and DRF. I can provide prod grade
> code quality in these techs.
> I can show samples of code to anyone who might wanna hire me.  Please see
> my resume for my previous experience.
>
> Please let me know if you have any opportunities for me or any questions.
> However, send me a personal email.
>
> Thanks!
>
>
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji.che...@gmail.com
> http://ryucoder.in
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMKMUjvNDvi%2BuTyqAcfWLC5YLpJKe84FoUTFp7xAM2ixy%2BukOQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BLLMZa7iifq%2BdG5ZD_k%2BY--UCp4%2B2ZAaAbQRs_eBh0xTY4xOA%40mail.gmail.com.


Re: Job related query

2021-02-20 Thread mubashar ilyas
how to apply for this job?

On Fri, Feb 19, 2021 at 10:02 AM neha bhurke  wrote:

> Hello everyone,
>
> We are looking for a python Django web app developer should have the total
> knowledge about python Django and should be experienced person at least for
> 2-3 years..
> If anyone  interested …
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BLLMZb-kjaEpS__xnofNzq0pHx7pvHu%2BaSTW22rZgNbbajWXA%40mail.gmail.com.


Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
Hi all,

We're maintaining an application that is hitting scaling problems.   It 
helps run grass-roots sporting events all over Europe, so Saturdays can 
produce large and unpredictable loads, with both logged-in users and public 
viewers. Despite a powerful server seemingly being lightly loaded (htop 
suggests just 3-6 out of24 cores typically busy, and free memory 
available), it often "hangs" for long periods - simple requests return 
after 10sec, and at times we have had to restart nginx.   

If anyone here has experience of this configuration under high loads, we'd 
be keen to hire an experienced expert to review and check we are not doing 
anything stupid with our nginx or uwsgi configuration.  

Likewise, if you really know how to cache Django with nginx, and work 
around the various cookies and language settings so that logged-in pages 
still work but anonymous ones can be cached, we'd love to get a bit of 
help  

Architecture is ubuntu 18.04, Django 3.0.12, with MariaDB and Mongo back 
ends used for slightly different things.

Feel free to contact me by private email if you,

Otherwise, if people have suggestions and questions here, I'll try to share 
what I can and am very grateful for any help...

Best Regards


Andy Robinson
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4fcc006e-37bb-4497-a692-45dfb99bfad1n%40googlegroups.com.