Skip to content

Commit

Permalink
increase timeouts; don't allow container creation from internal images
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Käser committed Aug 11, 2015
1 parent cc89acf commit 6127adc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ipynbsrv/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@ def clean(self):
raise ValidationError({
'server': 'A clone can only be created on the same node as it\'s parent.'
})
if self.image and self.image.is_internal:
raise ValidationError({
'image': 'Internal images cannot be used to create containers from.'
})
super(Container, self).clean()

def clone(self, name, description=None):
Expand Down
4 changes: 2 additions & 2 deletions lib/confs/nginx/ipynbsrv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ server {

location / {
include /usr/local/openresty/nginx/conf/uwsgi_params;
uwsgi_read_timeout 300s;
uwsgi_send_timeout 300s;
uwsgi_read_timeout 600s;
uwsgi_send_timeout 600s;
uwsgi_param REQUEST_URI $uri$args;
uwsgi_pass unix:/var/run/ipynbsrv/ipynbsrv.sock;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/confs/uwsgi/ipynbsrv.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ master=True
vacuum=True
max-requests=5000
processes=5
harakiri=300
chmod-socket = 660
chown-socket = www-data:www-data
harakiri=600
chmod-socket=660
chown-socket=www-data:www-data
pidfile=/var/run/ipynbsrv/ipynbsrv.pid
uwsgi-socket=/var/run/ipynbsrv/ipynbsrv.sock

0 comments on commit 6127adc

Please sign in to comment.