gcloud app engine – 502 Bad Gateway server error

# If you're just opening your home page
if request.method == "GET":
    return render_template('index.html')

# If you submitted one of the forms
elif request.method == "POST":
    if request.values.get("action", None) == 'Calculator':
        return render_template('/densitycalc.html')
    elif request.values.get("action2", None) == 'Linear Feet':
        return render_template('/linearFeet.html')
    elif request.values.get("action3", None) == 'Insurance':
        return render_template('insurance.html')
    elif request.values.get("action4", None) == 'Home':
        return render_template('index.html')