maybe too many db connections todb on pythonanywhere

71 views
Skip to first unread message

Manuele Pesenti

unread,
Oct 20, 2017, 10:08:17 AM10/20/17
to web2py-users
I often get this error from the db engine of my pythonanywhere account
service

OperationalError: FATAL:  remaining connection slots are reserved for
non-replication superuser connections

is there something quick to solve or by-pass it or do I need some
profiling to limitate requests to the db?

thank you in advance

    M.

Alex Glaros

unread,
Oct 20, 2017, 6:20:52 PM10/20/17
to web2py-users
there are a lot of fixes if search on your error string, plus max_connections parm info is at Postgres https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server

what is your max_connections set to now?

Alex Glaros


Manuele Pesenti

unread,
Oct 23, 2017, 4:33:48 AM10/23/17
to web...@googlegroups.com

Thanks Alex,

that's what I get from the db engine about my maximum number of connections:

psql (9.4.11, server 9.4beta3)
Type "help" for help.
postgres=# SHOW max_connections;
 max_connections
-----------------
 20
(1 row)

reading the suggested wiki page I found this: "PostgreSQL on good hardware can support a few hundred connections. If you want to have thousands instead..." so it seams something can be done on the side of the db configuration... if permitted from the service (maybe paying something more).

Cheers

    Manuele

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giles Thomas

unread,
Oct 24, 2017, 7:47:40 AM10/24/17
to web2py-users
Hi Manuele,

PythonAnywhere dev here: there's no extra cost if you want to increase the maximum number of Postgres connections -- just follow the instructions on this help page: https://help.pythonanywhere.com/pages/PostgresConnections/.   Don't forget to contact us once you've increased the connection count so that we can bounce your Postgres instance.


All the best,

Giles

Manuele Pesenti

unread,
Oct 24, 2017, 4:08:36 PM10/24/17
to web...@googlegroups.com
Il 24/10/17 13:47, Giles Thomas ha scritto:
> Hi Manuele,
>
> PythonAnywhere dev here: there's no extra cost if you want to increase
> the maximum number of Postgres connections -- just follow the
> instructions on this help
> page: https://help.pythonanywhere.com/pages/PostgresConnections/.  
> Don't forget to contact us once you've increased the connection count
> so that we can bounce your Postgres instance.
>
Hi Giles!
Good to know I'll try it and contact you immediatly.
Best regards

    M.
>
> All the best,
>
> Giles


Reply all
Reply to author
Forward
0 new messages