Reputation: 75
Trying to run postgres database with Django application on heroku, but I've met strange issue 'FATAL: remaining connection slots are reserved for non-replication superuser connections'. When I look to pg:info
, it shows
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
Do someone has an idea what's going wrong?
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'))
Here I'm dealing with OAuth2 Authorization, and I store my tokens in session, executing them each time when I need to send request to API
Upvotes: 0
Views: 1512
Reputation: 75
Problem is solved. I've written to Support, that was trouble from their side
Upvotes: -1