
Django → Django - Tutorial 058. Database Growth Due to django_session Table
Django, Postgres, garbage collection, Python, PostgreSQL
Lately, I have noticed that the fatal moment is approaching, when the disk space for the site on the hosting will catastrophically cease to be enough. And the database dump becomes incredibly huge, although there are no obvious prerequisites for this. The content size of the site isn't growing that fast, and the number of registered users isn't growing that fast either.
After examining the database, it was found that the size of the django_session table is just a gigantic almost 7 GB, and the size of the index also reaches almost 6.5 GB, despite the fact that the size of the database itself is 14 GB.
At the same time, the size of the second largest table is only 11 MB and this is a third-party application with a list of cities. And the size of the third table, which contains messages on the forum, is only 8 MB.
Accordingly, it was decided to figure out why this is happening and how to fix it.
Right now, I probably won’t reveal anything new to those who actively administer PostgreSQL databases, but for beginners and those who mainly deal with Django as a PET project, without professional use, the information may be useful.

Android → A little about memory leaks and ways to avoid them
Memory leaks, garbage collection, Java
What is memory Leaks in Android development ?
The application creates objects, they lie in memory and can not clean out after the completion of its work.
Why is this happening ?
Java has its own means of clearing memory from unused items. This is garbage collection .
The garbage collector marks all objects that can be deleted if they are not referenced. Memory leak - this is just a lost reference, which shows that the object can not be deleted.
The complexity of this bug
is that until a certain time it is not visible and it can not interfere.
There's a good quote from Benjamin Franklin:
“A small leak will sink a great ship."
Memory leaks take the RAM of the application. The amount of raw memory will grow and may one day cause your app to
slow down and crash
. This will lead to user dissatisfaction and most likely the app will be removed...
Fornex
Let me recommend you a great European Fornex hosting.
Fornex has proven itself to be a stable host over the years.
For Django projects I recommend VPS hosting
Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN
View HostingShare on social networks
Donate
The EVILEG project has switched to a non-commercial basis and will develop solely on the enthusiasm of the site creator, the enthusiasm of users, donations and the hosting referral system
Thank you for your support
Available ways to support the project
PayPal
PatreonYandex.MoneyMore