LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2012, 04:22 AM   #1
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Rep: Reputation: Disabled
Sygfault: overcommit_memory problem on database server


Hello,
After configuring new database (postgresql) server on Centos 6.3, we got a problem, database randomly stops with "Out of memory" error and such event are written in to the messages log:
Code:
Aug  1 09:48:20 dbsrv kernel: postmaster[20474]: segfault at 7600000091 ip 00000000006e34a0 sp 00007fff896a8ca0 error 6 in postgres[400000+4e6000]
Aug  1 10:31:19 dbsrv kernel: postmaster[26091]: segfault at 140000002c ip 00000000006e34a0 sp 00007fffe2189b00 error 6 in postgres[400000+4e6000]
Aug  1 10:35:31 dbsrv kernel: postmaster[30559]: segfault at 3bc6299690 ip 000000000062e103 sp 00007fffe218a750 error 4 in postgres[400000+4e6000]
Aug  1 11:21:21 dbsrv kernel: postmaster[1744]: segfault at 28 ip 00000000006e34a0 sp 00007fff197630f0 error 6 in postgres[400000+4e6000]
Aug  1 12:17:47 dbsrv kernel: postmaster[3402]: segfault at 6e ip 000000000046efb7 sp 00007fff34f5f310 error 4 in postgres[400000+4e6000]
Aug  1 13:04:18 dbsrv kernel: php[2700]: segfault at 0 ip 00007f5fb157d859 sp 00007fffacc86e00 error 4 in pdo_pgsql.so[7f5fb1577000+8000]
Server has 16GB memory in use and several php services + postgreslq 9.1.4 database installed.

Server kernel custom configuration:

Code:
kernel.shmmax = 8363171840
kernel.shmall = 2041790
vm.swappiness = 0
vm.overcommit_memory = 2
As desribed in a postgres manual starting from kernel 2.5, the vm.overcommit_memory = 2 politics is the best for postgresql database.

Uname: Linux dbsrv 2.6.32-279.2.1.el6.x86_64 #1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Postgres configuration:

Code:
shared_memory 2GB
work_mem 32MB
max_connection 456
Server have at least 3GB free RAM when apllication crashes and about 8GB of cache. Used RAM is not much than 3-4GB.

In a such configuration database or running services craches randomly. After several hours of studying we discovered that runing RAM consumption applications increase a probability of a crash, tried vim a large file, or memtest 3000. In both cases server craches with segfault.

After reconfiguring kernel to vm.overcommit_memory = 0, problem was solved and no crashed was detected from that moment at all.

The question is, why this is happening? What we have misconfigured and why vm.overcommit_memory = 2 is not working?
 
Old 08-02-2012, 06:47 AM   #2
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
Hi,

can you post the output of uname -a plz ?
 
Old 08-02-2012, 07:02 AM   #3
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
I've inserted in in the first post =) :

Quote:

Uname: Linux dbsrv 2.6.32-279.2.1.el6.x86_64 #1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
this is the output of uname -a
 
  


Reply

Tags
kernel, memory, postgres, segfault



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem backing radius server logs to database champs1234 Linux - Newbie 5 10-26-2010 01:56 AM
why deploy the database server before the application server? ShaqDiesel Linux - Server 2 10-19-2009 01:03 AM
How can i copt the MYSQL Database to a other server (Database) halvorls Linux - Server 3 07-27-2008 09:19 PM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 04:20 AM
reason for separating web server and database server hardigunawan Linux - Security 5 01-25-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration