From b87e39c2c3fce7556fe85e0c04bca1581c873fe1 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 8 Jul 2022 11:20:49 +0200 Subject: [PATCH] increase workers and buffersize --- app/scripts/app.sh | 5 +++-- scripts/sql/restore_db.sh | 4 ++-- telemeta/search_indexes.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/scripts/app.sh b/app/scripts/app.sh index c529d6b3..32272249 100644 --- a/app/scripts/app.sh +++ b/app/scripts/app.sh @@ -12,10 +12,11 @@ log='/var/log/uwsgi/app.log' # uwsgi params port=8000 processes=8 -threads=8 +threads=16 uid='www-data' gid='www-data' patterns='*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.svg;*.ttf;*.eot;*.woff;*.woff2' +buffersize=8192 # stating apps # pip install django-bootstrap3==6.2.1 @@ -62,5 +63,5 @@ else # app start uwsgi --socket :$port --wsgi-file $wsgi --chdir $app --master \ --processes $processes --threads $threads \ - --uid $uid --gid $gid --logto $log --touch-reload $wsgi + --uid $uid --gid $gid --logto $log --touch-reload $wsgi --buffer-size $buffersize fi diff --git a/scripts/sql/restore_db.sh b/scripts/sql/restore_db.sh index 8a8fd6b6..9b8470b2 100755 --- a/scripts/sql/restore_db.sh +++ b/scripts/sql/restore_db.sh @@ -6,9 +6,9 @@ FILE=`ls -t $DIR/*.sql* | head -1` echo "Restoring: "$FILE if [[ $FILE == *".gz" ]]; then - gunzip < $FILE | mysql -hdb -uroot -p$MYSQL_ROOT_PASSWORD telemeta +# gunzip < $FILE | mysql -hdb -uroot -p$MYSQL_ROOT_PASSWORD telemeta else - mysql -hdb -uroot -p$MYSQL_ROOT_PASSWORD telemeta < $FILE +# mysql -hdb -uroot -p$MYSQL_ROOT_PASSWORD telemeta < $FILE fi echo "Done!" diff --git a/telemeta/search_indexes.py b/telemeta/search_indexes.py index c4949789..cb2cda74 100644 --- a/telemeta/search_indexes.py +++ b/telemeta/search_indexes.py @@ -286,4 +286,4 @@ class InstrumentAliasIndex(indexes.SearchIndex, indexes.Indexable): def index_queryset(self, using=None): instrualias = MediaItemPerformance.objects.values('alias') - return InstrumentAlias.objects.filter(pk__in=instrualias) \ No newline at end of file + return InstrumentAlias.objects.filter(pk__in=instrualias) -- 2.39.5