Reputation: 2648
I am using Django and Python.
I call ps -aux
:
postgres 46214 2.4 0.4 252824 139052 ? Ss 15:24 0:07 postgres: postgres mydb [local] SELECT
postgres 46216 1.7 0.4 252664 136680 ? Ss 15:24 0:04 postgres: postgres mydb [local] SELECT
...
I get so many such lines (> 10). Also, communication to my database through the /admin
page takes very long.
Killing the processes does not work - they come back after some time.
As a consequence, I cannot see the database, because the request takes very long and times out.
Can anybody help? Has anybody encountered that before?
Upvotes: 0
Views: 59
Reputation: 247625
You must find the program running on your machine that connects to the database and runs all these SELECT
statements.
Then you can stop it or throttle it so that it does not bring the server to its knees.
If you connect to the database with psql
, you can query pg_stat_activity
and find out what queries are being executed. That may help you to find out what program it could be.
Upvotes: 1