Hi guys,
This is my first post here. I am playing with appscale these days and actually testing autoscaling. I have installed appscale from source on a VM and it went great. After that I created a GAE (hello world) app with a 5 seconds time delay before returning the "hello world" response. My view looks like:
from django import http
import time
def home(request):
time.sleep(5)
return http.HttpResponse('Hello World!')
I deployed this app successfully by following the appscale documentation. I can hit the URL and get the "hello world" response! great. Now i wanted to send a flood of requests to see appserver autoscales or not. I sent 50 requests in parallel using Python multiprocessing.Process module and i can see appserver's count increased from 1 to 3 in appscale status output. I increased the number of requests to 100 and now I am receiving the following error after certain number of processes:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "autoscale.py", line 8, in hello
response = urllib2.urlopen('
http://192.168.33.10:8080')
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Bad Gateway
It looks like appscale is using dev_appserver to serve the requests rather than any web server? Do i missed any configuration regarding this? Please suggest what will be the fix. Please find the output of the command "appscale status" given below if its helpful:
vagrant@appscale-image0:~$ appscale status
Status of node at
192.168.33.10:
Currently using 7.0 Percent CPU and 73.90 Percent Memory
Hard disk is 6 Percent full
Is currently: load_balancer, taskqueue_master, zookeeper, db_master, taskqueue, memcache, shadow, login, appengine
Database is at 192.168.33.10
Is in cloud: cloud1
Current State: Preparing to run AppEngine apps if needed
Hosting the following apps: hello-django-app-engine
The number of AppServers for app hello-django-app-engine is: 1
View status information about your AppScale deployment at
http://192.168.33.10:1080/statusvagrant@appscale-image0:~$
Thanks