I have a website in production with low traffic (10-20 rpm). The application servers runs on the same box as the database, connection to the DB is done via localhost
For a few months everything has been running fine.
About 5 days ago Postgres started to randomly returns this error, about 1 error every 100 reqs :
server closed the connection unexpectedly
This probably means the server terminated abnormally before or while processing the request.
No major modification was done to the app, database or system setup.
If i understand the error message correctly, it means the database process was killed ?
I'm trying to understand what can cause this error :
- Postgres logs don't show anything (no log around error time)
- Kernel logs don't show anything either (no log around error time)
- Syslog only shows that a cron jobs started the requests that failed with this error
Memory usage on the server seems ok (70%), i have plenty of free disk space.
When i manually connect to Postgres through psql or the ruby PG client i can execute select and update queries.
I already had a look at this question : PostgreSQL Error : server closed the connection unexpectedly
I tried to re-index the tables. I also performed a pgdump which worked fine (i didn't restore data)
- Ubuntu 14.04
- Postgres 9.4
- Database size is about 6.5GB
App connecting to the DB :
- Ruby on Rails 4.2
- PG gem 0.18.2