python - Django-cities exits with "killed" -


i trying install django-cities on server 500mb ram. whenever run: manage.py cities

the system exits saying killed.

trying run: manage.py cities --import=country --force worked, guessing matter of running out of memory.

to bypass, tried refer package local copy of cities' data file. still didn't work.

any ideas on how can migrate data without having increase memory on server?

based on suggestion comments, solved setting temporary swap file.

if unfamiliar it, can follow these steps:

  1. set swap file

    touch /var/swap.img  chmod 600 /var/swap.img 
  2. set swap file size

    cd /var  dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 

    this create 1gb swap file.

  3. prepare disk image

    mkswap /var/swap.img 
  4. activate swap memory

    swapon /var/swap.img  

once done, can turn off swap image:

    swapoff /var/swap.img 

more information on virtual memory , swap files can found here: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps#4


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - How to get a widget position inside it's layout in Kivy? -