Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django Test Run Environment error: no enough space left on disk

Tags:

python

django

I was going through a Django tutorial, I was able to execute through the following steps creating a project, database setup the problem raised in development server step.

I tried (venv)$ python manage.py runserver in virtual environment

output:

Performing system checks...

System check identified no issues (0 silenced).

January 14, 2015 - 09:39:53
Django version 1.7.2, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

[2015-01-14 09:39:54,347 pyinotify ERROR] add_watch: cannot watch /usr/local/lib/python2.7/dist-packages/django/contrib/auth/hashers.py WD=-1, Errno=No space left on device (ENOSPC)
[2015-01-14 09:39:54,348 pyinotify ERROR] add_watch: cannot watch /usr/local/lib/python2.7/dist-packages/django/test/__init__.py WD=-1, Errno=No space left on device (ENOSPC)

To check whether my partition disk is out of space I did tried

(venv) $ df

output:

Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1      236182272 56881792 167280052  26% /
none                   4        0         4   0% /sys/fs/cgroup
udev             1969912        4   1969908   1% /dev
tmpfs             397084     1480    395604   1% /run
none                5120        0      5120   0% /run/lock
none             1985416     3048   1982368   1% /run/shm
none              102400       28    102372   1% /run/user

I could clearly see few free space in the available section.

Have anybody had this error before while trying to runserver in Django.

like image 520
Praneeth Avatar asked Jan 14 '15 17:01

Praneeth


2 Answers

You may have reached your quota of watches.

To find your current limit, type this in your terminal:

cat /proc/sys/fs/inotify/max_user_watches

Which is typically 8192 by default.

To increase your limit, type this:

sudo sysctl fs.inotify.max_user_watches=16384

Then restart django.

To permanently set this limit, type this:

echo 16384 | sudo tee -a /proc/sys/fs/inotify/max_user_watches

There's a very detailed answer, where you'll find more info here: https://unix.stackexchange.com/a/13757/79648

like image 75
congusbongus Avatar answered Nov 11 '22 20:11

congusbongus


You can try this link.

Basically what worked for me was that I used the first 3 commands:

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

And then I restarted my development server, and I wasn't seeing the errors.

like image 1
krngrvr09 Avatar answered Nov 11 '22 18:11

krngrvr09