Heroku Postgres致命:剩余的连接插槽保留用于非复制超级用户连接

时间:2015-08-12 12:38:33

标签: django postgresql heroku

尝试在heroku上使用Django应用程序运行postgres数据库,但我遇到了奇怪的问题'致命:剩余的连接插槽是为非复制超级用户连接保留的'。当我查看pg:info时,会显示

Plan:        Hobby-dev
Status:      Available
Connections: 1/20
PG Version:  9.4.1
Created:     2015-08-07 13:30 UTC
Data Size:   6.6 MB
Tables:      0
Rows:        0/10000 (In compliance) - refreshing
Fork/Follow: Unsupported
Rollback:    Unsupported
Region:      Europe
Add-on:      dozing-duly-7395

有人知道出了什么问题吗?

UPD:

''' Renders home page
'''
@login_required
def render_home(request):
    if not request.session.get('credentials', False):
        uri = util.refresh_credentials()
        return HttpResponseRedirect(uri)

    template = loader.get_template('templates/home.html')
    context = RequestContext(request, {"username": request.user.username})

    return HttpResponse(template.render(context))


''' Handle OAuth2 authorization
'''
def oauth_autorization(request):
    http_auth = util.authorize(request.GET['code'])
    request.session['credentials'] = http_auth.to_json()

    return HttpResponseRedirect(reverse('auth:home'))

这里我正在处理OAuth2授权,我将我的令牌存储在会话中,每当我需要向API发送请求时执行它们

1 个答案:

答案 0 :(得分:-1)

问题解决了。我写信给支持,这是他们身边的麻烦