Request entity too large + nginx server
Submitted by stephenwenceslao on Sat, 09/09/2023 - 22:17Add this to conf nginx website
client_max_body_size 512M;
Add this to conf nginx website
client_max_body_size 512M;
sudo apt install redis-server
sudo systemctl restart gunicorn_app
sudo usermod -aG username www-data
sudo nginx -t && sudo systemctl restart nginx.service
python manage.py makemigrations account
python manage.py migrate
cd $HOME/snap/flutter/common/flutter
git checkout v2.10.5
Debian 11 bullseye drupal local environment
Clone the repository into ~/projects/drupal/projectname
** Dump database from production **
2. Dump database from prod drupal website using drush:
../vendor/drush/drush/drush sql-dump --gzip --result-file=../db_dump_08072023_1102am_latest.sql
3. Copy dump db from local using rsync
rsync --progress username@domainname.com:~/directory/db_dump_08072023_1102am_latest.tar.gz ~/projects/drupal/projectname
* Create mysql user
Debian 11 Bullseye
1. After installing the OS, Update the /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main deb-src http://deb.debian.org/debian bullseye main deb http://deb.debian.org/debian-security/ bullseye-security main deb-src http://deb.debian.org/debian-security/ bullseye-security main deb http://deb.debian.org/debian bullseye-updates main deb-src http://deb.debian.org/debian bullseye-updates main deb http://ftp.hk.debian.org/debian sid main non-free-firmware
2.
Sudo apt update
to update the sources
3.
There is a good manager that will help you with all node versions. It's called nvm
(Node version manager).
https://github.com/creationix/nvm
All install guides are on git page. I install it like this.
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
bash install_nvm.sh
Check to see if everything installed correctly
nvm --version
When the IC is shorted the usual cause is the 7805 regulator is the problem. Just replace the regulator and IC to make it work again.
UPDATE:
Replace the rectifier diode and regulator just to make sure the IC will not be damage.
After soldering the IC and cool it down. Need to clean using lacquer thinner to avoid short circuit.
Gamitin lagi ang 12v 10amper power supply, para iwas aberya ng vendo.
Pag mag testing ng timer ay wag niyo i grounded ung board sa metal or kamay para hindi mag malfunction pag test.
Fix using
installed telephony version 0.1.1
flutter version 2.10.3
# may/24/2022 14:35:48 by RouterOS 6.40.4
# software id = W8V4-SIVP
#
# model = RouterBOARD 931-2nD
# serial number = 7CBD08915F53
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
/interface ethernet
set [ find default-name=ether1 ] name=1-Globe
set [ find default-name=ether2 ] name=2-Smart
set [ find default-name=ether3 ] name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=10.0.0.2-10.0.0.254
Pag hindi ka maka connect sa ngrok admin.
This site can’t be reached xxxx-xxx-176-64-191.ngrok.io’s DNS address could not be found. Diagnosing the problem. DNS_PROBE_POSSIBLE
Ibig sabihin nito kailangan niyo palitan ung DNS sa ip settings sa computer/phone mo. Iset niyo lang ang DNS
Uploading flutter android sdk 31 version makes an error on google play store.
You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
memory leak error/warning
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
Just add this line of code before calling the setstate.
if (!mounted) { return; } // your setState here
Steps pano maka access online sa wifi ng bayan vendo:
1. Register ka muna sa ngrok website(https://dashboard.ngrok.com/signup) pra maka kuha ng authentication token
2. Once maka login kana sa ngrok, copy niyo ung authentication token sa ngrok account.
Pag ung pisowifi pag connect mo is naka connecting lang lagi, obtaining IP ADDRESS pag check mo sa settings ng phone mo. Possible problema:
1. Check natin ung USB TO LAN baka nasira or nag malfunction na. Palitan lang natin ng bago and make sure ung bago is tested na working.
2. Pag hindi padin nag work, icheck natin ung utp cable from USB TO LAN (gamitin muna nating ung bago hindi ung luma para maka sigurado tayo na working ung USB TO LAN).
I have spent so many hours just to figure this out. I use wss(secure) for my django websocket. Ive realized that using firebase and firecamp is working perfectly, but in my flutter app websocket connect it does not work. arggg, spending many hours working this error (I initially dont know why the heck is this).
Adding this piece of code in the main.dart file fix my issue. :)
It cause warning error because because of building the widget when the entire widget is not yet build. I added this certain code to wait, after it will rebuild the widget I created in initState.
Add this line of code inside your stream listen function, under initState.
using AsyncWebcocketConsumer to add database access instead of using WebsocketConsumer, this is base on the channels tutorial.
Version:
django == 4.0.3 channels == 3.0.4
Important notice: must declare first before, AuthMiddlewareStack.
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings') django.setup() from channels.auth import AuthMiddlewareStack
1.Add middleware.py in your django app.
must allow whatever port you set
1.Can run gunicorn on your env
gunicorn --bind 0.0.0.0:9001 myapp.wsgi2.Added subdomain on droplet networking. 3.Root access. 4.Install certbot nginx
sudo apt install certbot python3-certbot-nginx.
1.Make sure you already installed the gunicorn on your django env
pip install gunicorn
2.Create new socket file on
sudo nano /etc/systemd/system/gunicorn_subdomain1.socket
When doing http request testing in production. Don't forget to add HTTPS prefix.
Need to restart application from namecheap cpanel to take effect the changes from
models.py.
python manage.py makemigrations
python manage.py migrate
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
Follow this article: https://umar-yusuf.blogspot.com/2020/04/setting-up-django-project-and-app-on.html
don't forget to add 'django.contrib.sites' in INSTALLED_APPS.
Also add ALLOWED_HOST = ['your_domain'].
If there an error site not exist: